@GenericField and full-text search

HI again, i dont know if i should open new topic.
i have almost migrated from 5.11 to 6. But i have a minor problem yet.
The searching with letters not working for me.

final SearchPredicateFactory pf;

it works only with UPPERCASE letter. eq. TABLE and not table.
i am using the annotation @GenericField(sortable = Sortable.YES) for this field.


Please use new topics for new questions. I moved your message this time.

@GenericField won’t give you full-text search, you need to use @FullTextField. See Hibernate Search 6.1.7.Final: Reference Documentation

And since you also needs sorts, and that’s not possible for full-text fields, you will need two fields: one for full-text search and one for sorts. So, something like:

@GenericField(name = "fieldName_sort", sortable = Sortable.YES)
private String fieldName;

See Hibernate Search 6.1.7.Final: Reference Documentation

1 Like

My bad ! It works fine … Thank you again !!

Is it bad practise to have 5000+ properties with
@GenericField(name = “fieldName_sort”, sortable = Sortable.YES) ?

The size of indexes will be too high or is it the same with a simple @GenericField(sortable = Sortable.YES)?

Are you being serious? :slight_smile:

1 Like