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

Guillaume Smet guillaume.smet at gmail.com
Tue Aug 4 10:11:53 EDT 2015


Hi Sanne,

On Wed, Jul 29, 2015 at 1:26 PM, Sanne Grinovero <sanne at hibernate.org>
wrote:

> I'm not sure if this should be extending the @Field annotation as
> there are special restrictions implied in terms of analysis: are we
> going to enforce a specific type of tokenizer, or simply take the
> analysis option away?
>

You can't remove the analysis option away: it's often used to normalize
sorting on strings (lowercase, remove accents, remove special characters
and so on).

FWIW, we use specific fields for sorting each time we need to sort on a
string as we don't want to tokenize the string (but not for numerics and
dates). Maybe @SortFields/@SortField annotations would be in order (I don't
like Sortable as I don't think it's a good idea to use these fields for
search).

-- 
Guillaume


More information about the hibernate-dev mailing list