Hibernate Search 5 allows to define a field with a null token without specifying the token to use, and to configure the token to use through configuration properties. See org.hibernate.search.test.query.nullValues.IndexAndQueryNullTest#configure, org.hibernate.search.test.query.nullValues.Value#fallback and org.hibernate.search.test.query.nullValues.IndexAndQueryNullTest#testIndexAndSearchConfiguredDefaultNullToken for an example. I think we should remove this feature completely in Search 6. Rationale:
- As explained in
HSEARCH-1995 Open , this is not as easy to implement as it used to be, because we now support multiple field types and there's no null token that would work for all of them.
- If users need to use a constant, they can reference it directly through the Field.indexNullAs attribute, and they do not need a configuration option.
- If users need this option to be configurable through application properties, they can use the programmatic mapping.
|