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.
On Thu, Jul 15, 2010 at 2:35 AM, Samuel Doyle firstname.lastname@example.org wrote:
On Wed, Jul 14, 2010 at 4:34 PM, Shay Banon email@example.com:
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.
On Thu, Jul 15, 2010 at 2:26 AM, Samuel Doyle firstname.lastname@example.org:
It is actually a lastname field and it is analyzed although it probably
should not be.
It did work before however.
On Wed, Jul 14, 2010 at 4:20 PM, Shay Banon <
Are you sorting on an analyzed field or a field that has several values
within a document?
On Thu, Jul 15, 2010 at 2:18 AM, Samuel Doyle email@example.com:
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]; ]
is this something new?