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.
failed the git push, need to rebase & retest.