The cause is probably HSEARCH-2046 (https://github.com/hibernate/hibernate-search/commit/c1db5107a86222727c2be9535570891fdfb48be3).
The thing is, {{@ElementCollection}} may not only be used on primitive types, but also on {{@Embeddables}}, where a prefix, or even a depth to avoid infinite recursion, make a lot of sense.
Also, @IndexedEmbedded doesn't even work on collections of primitive type. This makes sense to me, as the annotation is intended to index *properties* of a given field, and primitive types don't have any. I think there was a confusion when solving HSEARCH-2046, due to the fact that in this test, there is an @IndexedEmbedded and a @Field on a collection property, with both having the same field name... So when we saw elements in the index, they were generated by the field, and when we saw null tokens, they were generated by the @IndexedEmbedded. |
|