Hi,
First, hello as It's my first post on this group I'm seeking your
help as I've been banging my head against an issue with ES (version
0.18.6).
The issue when I sort on a not_analyzed string attribute.
I get the following error:
QueryPhaseExecutionException[[system][2]: query[filtered(name:new*)-
FilterCacheFilterWrapper(_type:UILayout)],from[0],size[15],sort[<custom:
"name":
org.elasticsearch.index.field.data.strings.StringFieldDataType
$1@6f172517>]:
Query Failed [Failed to execute main query]];
nested: IOException[Can't sort on string types with more than one
value per doc, or more than one token per field];
I have a "name" attribute with index=not_analyzed. There are a certain
mumber of objects put into ES with "name" attribute ranging from
"newA" to "newX".
The name attribute is unique.
When I do a search query with the query string "name:new*", all
entities get returned. I on top of that query I sort on the name
attribute, I get the error mentioned above. I don't know what I'm
doing wrong so I'm seeking your help 0:-)
I created a gist with the mapping details, a non sortless query and a
sort query: elasticsearch issue: sort fail on not_analyzed attribute · GitHub
Thanks,
- Nicolas