Why cannot I sort by a field which is analyzed? It should make sense to
analyze a "name" field to index products and also be able to sort by "name"
when getting the search results, agree?
sort[<custom:"nombre":
org.elasticsearch.index.field.data.strings.StringFieldDataType$1@46176578>
!]: 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]; }]"}]
You can use multi field mapping, with the "original" being analyzed, and one named "sortable" to have it not_analyzed.
On Thursday, February 3, 2011 at 4:53 PM, Enrique Medina Montenegro wrote:
Hi,
Why cannot I sort by a field which is analyzed? It should make sense to analyze a "name" field to index products and also be able to sort by "name" when getting the search results, agree?
sort[<custom:"nombre": org.elasticsearch.index.field.data.strings.StringFieldDataType$1@46176578>!]: 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]; }]"}]
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.