Cannot index null or empty values for faceted fields

Description

It seems that it is impossible to have database-stored null or empty strings for domain properties annotated with @Facet.

I tried the configuration below:

a call to persist on a newly created IndexedObject() will yield the following exception:

The documentation states (5.4.1.1) that

null values should be avoided

, not that null values are not supported. I do understand that null/empty fields cannot be indexed, but I thought that was the goal of the @Field property indexNullAs, in order to have a marker in the index for null values. However it seems that the conversion from null in the index does not take this setting into account.

The only bypass that I have found is to define a default, non-null, non-empty value to any indexed property used in conjunction with @Facet within my domain object. That is extremely inconvenient since I would have to handle that specific "null" (for example) value throughout my application instead of only when filtering on facets.

Please let me know if I have missed something, or if there is a configuration bypass.

Thanks,

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Julien Serdaru-Barbul

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure