[hibernate-dev] [Hibernate Search] DocValues and Sorting API -> new mapping annotations ?

Gustavo Fernandes gustavo at infinispan.org
Fri Aug 7 08:31:16 EDT 2015


On Fri, Aug 7, 2015 at 1:14 PM, Sanne Grinovero <sanne at hibernate.org> wrote:

> A quick update on some more exploration on this:
> it turns out sorting on a NumericField when this field is also using
> an "indexNullAs" token gets the UninvertingReader approach to throw an
> exception.
> My two conclusions:
>  - we need to move away from supporting those tokens in NumericField,
> especially as stricter schema is coming in next gen Lucene
>  - yet another reason to clearly separate fields meant for searching vs
> sorting
>


One possible workaround is to enforce the indexNullAs value to match the
underlying field type, at the
moment it is always a string.

Another possibility is to model "null" as field not present in the lucene
document, instead of a marker token.

Gustavo


More information about the hibernate-dev mailing list