lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uwe Schindler <>
Subject Re: Sorting IndexSearcher results by LongPoint with 6.0
Date Thu, 26 May 2016 22:43:39 GMT

Sorting does not work on indexed fields anymore (since Lucene 5), unless you use UninvertingReader.
Point values don't work with that because they cannot be uninverted.

For sorting it's the same rule for all field types: enable DocValues! You just have to add
another field instance with same name using doc values (some numeric type).


Am 26. Mai 2016 23:53:56 MESZ, schrieb Jeremy Friesen <>:
>I'm attempting to upgrade my project to Lucene 6.0, and have run into
>issue with sorting my results. My documents have a timestamp field that
>previously a StoredField with NumericType: Long. I've converted it to a
>LongPoint, which seems to work fine for range queries.
>My problem is that trying to sort search results with a SortField of
>Long now doesn't seem to work with a LongPoint field. I get an
>IllegalStateException "unexpected docvalues type NONE for field
>(expected=NUMERIC). Use UninvertingReader or index with docvalues."
>I'm guessing the sorter hasn't been updated to work with PointValues
>but I just wanted to check with the mailing list to see if anyone else
>found a way to do results sorting under 6.0.

Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message