I am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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 am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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 am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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]; ]
It might have worked before (it actually depends on the Lucene version when
it worked), but, it does not make sense to sort on a field that is analyzed.
So, either use a multi_field mapping, and add another mapping for last_name
that is not analyzed (and name it something like lastNameSortable), or have
the actual last name not analyzed.
I am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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]; ]
It might have worked before (it actually depends on the Lucene version when
it worked), but, it does not make sense to sort on a field that is analyzed.
So, either use a multi_field mapping, and add another mapping for last_name
that is not analyzed (and name it something like lastNameSortable), or have
the actual last name not analyzed.
I am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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]; ]
Just to explain a bit more, what you ended up with when sorting on a field
that is analyzed (on recent Lucene version, before it was throwing a similar
exception) is just sorting on the first term that got tokenized from the
field. Many times its not really what you want.
I have reimplemented sorting in 0.9 (so it uses the same data facets use,
and script fields) for better memory management, and currently its easier
for me to simply throw an exception in this case. I might revisit this
decision later on and allow to sort on fields that have multiple terms, but
it will still only use the first term, which, as mentioned above, does not
make sense most of the times.
It might have worked before (it actually depends on the Lucene version
when it worked), but, it does not make sense to sort on a field that is
analyzed. So, either use a multi_field mapping, and add another mapping for
last_name that is not analyzed (and name it something like
lastNameSortable), or have the actual last name not analyzed.
I am now seeing failures in my search when sorting. I have not made any
changes to my code or data which had worked previously.
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.