Sort returns with no mapping found

I indexed JSON documents into "managedobject" index and "volume" type that
looks like

{
"base:DisplayName":"00085315",
"base:Name":"00085315",
"storage:Usage":15,
"base:UUID":"aa76383f101749c7a516f4da1a0cc95f",
"storage:IsMapped":"True",
"base:Identifier":"00085315",
"storage:VolumeID":"85315"
}

And when is verify /managedobject/volume/_mapping?pretty=1 I get this
mapping

{
"managedobject" : {
"volume" : {
"properties" : {
"base:DisplayName" : {
"type" : "string"
},
"base:Name" : {
"type" : "string"
},
"base:Identifier" : {
"type" : "string"
},
"base:UUID" : {
"type" : "string"
},
"storage:IsMapped" : {
"type" : "string"
},
"storage:Usage" : {
"type" : "long"
},
"storage:VolumeID" : {
"type" : "string"
}
}
}
}
}

But when I try to sort by
/managedobject/volume/_search?q=*&sort=base%5C:Name:asc it returns an error

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
total failure; shardFailures {[mAxT5cUyRQecsnWHJO0SXA][managedobject][1]:
SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][2]:
SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][3]:
SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][0]:
SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][4]:
SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(
:*))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]]; }]","status":500}

Any pointers would be helpful

With best regards,
Afzal

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

This works:

sort=base%3AName%3Aasc

clint

On 15 May 2013 13:23, ajan jan.afzal@gmail.com wrote:

I indexed JSON documents into "managedobject" index and "volume" type that
looks like

{
"base:DisplayName":"00085315",
"base:Name":"00085315",
"storage:Usage":15,
"base:UUID":"aa76383f101749c7a516f4da1a0cc95f",
"storage:IsMapped":"True",
"base:Identifier":"00085315",
"storage:VolumeID":"85315"
}

And when is verify /managedobject/volume/_mapping?pretty=1 I get this
mapping

{
"managedobject" : {
"volume" : {
"properties" : {
"base:DisplayName" : {
"type" : "string"
},
"base:Name" : {
"type" : "string"
},
"base:Identifier" : {
"type" : "string"
},
"base:UUID" : {
"type" : "string"
},
"storage:IsMapped" : {
"type" : "string"
},
"storage:Usage" : {
"type" : "long"
},
"storage:VolumeID" : {
"type" : "string"
}
}
}
}
}

But when I try to sort by
/managedobject/volume/_search?q=*&sort=base%5C:Name:asc it returns an error

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
total failure; shardFailures {[mAxT5cUyRQecsnWHJO0SXA][managedobject][1]:
SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][2]:
SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][3]:
SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][0]:
SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][4]:
SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(
:*))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]]; }]","status":500}

Any pointers would be helpful

With best regards,
Afzal

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Great, thanks it works.

Another question when I try this by sending a json query it does not sort
the results

{
"query": {
"match_all": {
}
},
"sort": [
{ "base:Name" : {"order" : "asc"} }
]
}

I also tried

{
"query": {
"match_all": {
}
},
"sort": [
{ "base%3AName" : {"order" : "asc"} }
]
}

On Wednesday, 15 May 2013 17:16:38 UTC+5:30, Clinton Gormley wrote:

This works:

sort=base%3AName%3Aasc

clint

On 15 May 2013 13:23, ajan <jan....@gmail.com <javascript:>> wrote:

I indexed JSON documents into "managedobject" index and "volume" type
that looks like

{
"base:DisplayName":"00085315",
"base:Name":"00085315",
"storage:Usage":15,
"base:UUID":"aa76383f101749c7a516f4da1a0cc95f",
"storage:IsMapped":"True",
"base:Identifier":"00085315",
"storage:VolumeID":"85315"
}

And when is verify /managedobject/volume/_mapping?pretty=1 I get this
mapping

{
"managedobject" : {
"volume" : {
"properties" : {
"base:DisplayName" : {
"type" : "string"
},
"base:Name" : {
"type" : "string"
},
"base:Identifier" : {
"type" : "string"
},
"base:UUID" : {
"type" : "string"
},
"storage:IsMapped" : {
"type" : "string"
},
"storage:Usage" : {
"type" : "long"
},
"storage:VolumeID" : {
"type" : "string"
}
}
}
}
}

But when I try to sort by
/managedobject/volume/_search?q=*&sort=base%5C:Name:asc it returns an error

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
total failure; shardFailures {[mAxT5cUyRQecsnWHJO0SXA][managedobject][1]:
SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][1]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][2]:
SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][2]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][3]:
SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][3]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][0]:
SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(
:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"
","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][0]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]];
}{[mAxT5cUyRQecsnWHJO0SXA][managedobject][4]:
SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(:))],from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"query":{"query_string":{"query":"","lowercase_expanded_terms":true,"analyze_wildcard":false}},"sort":[{"base\\:Name":{"order":"asc"}}]}]]];
nested: SearchParseException[[managedobject][4]:
query[ConstantScore(NotDeleted(
:*))],from[-1],size[-1]: Parse Failure [No
mapping found for [base\:Name] in order to sort on]]; }]","status":500}

Any pointers would be helpful

With best regards,
Afzal

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

That's because you are using percent encoding (intended for the query
string) inside JSON!

just use sort: [{"base:Name": {"order": "asc"}}]

clint

On 15 May 2013 14:59, ajan jan.afzal@gmail.com wrote:

Great, thanks it works.

Another question when I try this by sending a json query it does not sort
the results

{
"query": {
"match_all": {
}
},
"sort": [
{ "base:Name" : {"order" : "asc"} }
]
}

I also tried

{
"query": {
"match_all": {
}
},
"sort": [
{ "base%3AName" : {"order" : "asc"} }
]
}

On Wednesday, 15 May 2013 17:16:38 UTC+5:30, Clinton Gormley wrote:

This works:

sort=base%3AName%3Aasc

clint

On 15 May 2013 13:23, ajan jan....@gmail.com wrote:

I indexed JSON documents into "managedobject" index and "volume" type
that looks like

{
"base:DisplayName":"00085315",
"base:Name":"00085315",
"storage:Usage":15,
"base:UUID":"aa76383f101749c7a516f4da1a0cc95f",
"storage:IsMapped":"True",
"base:Identifier":"00085315",
"storage:VolumeID":"85315"
}

And when is verify /managedobject/volume/_**mapping?pretty=1 I get this
mapping

{
"managedobject" : {
"volume" : {
"properties" : {
"base:DisplayName" : {
"type" : "string"
},
"base:Name" : {
"type" : "string"
},
"base:Identifier" : {
"type" : "string"
},
"base:UUID" : {
"type" : "string"
},
"storage:IsMapped" : {
"type" : "string"
},
"storage:Usage" : {
"type" : "long"
},
"storage:VolumeID" : {
"type" : "string"
}
}
}
}
}

But when I try to sort by /managedobject/volume/_search?**q=*&sort=base%5C:Name:asc
it returns an error

{"error":"**SearchPhaseExecutionException[**Failed to execute phase
[query], total failure; shardFailures {[mAxT5cUyRQecsnWHJO0SXA][managedobject][1]:
SearchParseException[[managedobject][1]: query[ConstantScore(
NotDeleted(:))],from[-1],size[-1]: Parse Failure [Failed to parse
source [{"query":{"query_string":
{"query":"*","lowercase_

expanded_terms":true,"analyze_wildcard":false}},"
sort":[{"base\\:Name":{"**order":"asc"}}]}]]]; nested:
SearchParseException[[managedobject][1]: query[ConstantScore(
NotDeleted(:))],from[-1],**size[-1]: Parse Failure [No mapping found
for [base\:Name] in order to sort on]]; }{[mAxT5cUyRQecsnWHJO0SXA][managedobject][2]:
SearchParseException[[managedobject][2]: query[ConstantScore(
NotDeleted(:))],from[-1],size[-1]: Parse Failure [Failed to parse
source [{"query":{"query_string":
{"query":"*","lowercase_

expanded_terms":true,"analyze_wildcard":false}},"
sort":[{"base\\:Name":{"**order":"asc"}}]}]]]; nested:
SearchParseException[[managedobject][2]: query[ConstantScore(
NotDeleted(:))],from[-1],**size[-1]: Parse Failure [No mapping found
for [base\:Name] in order to sort on]]; }{[mAxT5cUyRQecsnWHJO0SXA][managedobject][3]:
SearchParseException[[managedobject][3]: query[ConstantScore(
NotDeleted(:))],from[-1],size[-1]: Parse Failure [Failed to parse
source [{"query":{"query_string":
{"query":"*","lowercase_

expanded_terms":true,"analyze_wildcard":false}},"
sort":[{"base\\:Name":{"**order":"asc"}}]}]]]; nested:
SearchParseException[[managedobject][3]: query[ConstantScore(
NotDeleted(:))],from[-1],**size[-1]: Parse Failure [No mapping found
for [base\:Name] in order to sort on]]; }{[mAxT5cUyRQecsnWHJO0SXA][managedobject][0]:
SearchParseException[[managedobject][0]: query[ConstantScore(
NotDeleted(:))],from[-1],size[-1]: Parse Failure [Failed to parse
source [{"query":{"query_string":
{"query":"*","lowercase_

expanded_terms":true,"analyze_wildcard":false}},"
sort":[{"base\\:Name":{"**order":"asc"}}]}]]]; nested:
SearchParseException[[managedobject][0]: query[ConstantScore(
NotDeleted(:))],from[-1],**size[-1]: Parse Failure [No mapping found
for [base\:Name] in order to sort on]]; }{[mAxT5cUyRQecsnWHJO0SXA][managedobject][4]:
SearchParseException[[managedobject][4]: query[ConstantScore(
NotDeleted(:))],from[-1],size[-1]: Parse Failure [Failed to parse
source [{"query":{"query_string":
{"query":"*","lowercase_

expanded_terms":true,"analyze_wildcard":false}},"
sort":[{"base\\:Name":{"**order":"asc"}}]}]]]; nested:
SearchParseException[[managedobject][4]: query[ConstantScore(
NotDeleted(:))],from[-1],**size[-1]: Parse Failure [No mapping found
for [base\:Name] in order to sort on]]; }]","status":500}

Any pointers would be helpful

With best regards,
Afzal

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@**googlegroups.com.

For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.