Check for illegal usage of @IndexedEmbedded

Description

Apparently some people tend to assume that in indexed embedded classes all normal fields should use the @IndexedEmbedded annotation instead of @Field/.. like in:

1 2 @IndexedEmbedded String countryName

Might be nice to check for such unexpected usage, as it's currently silently ignored.

Also (HSEARCH-1971):

As this SO question made me realize, it's not always clear when a field needs a @Field annotation rather than a @IndexedEmbedded annotation, for example like in the specific question when indexing a simple collection of enums.

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

Yes, likely

Feedback Requested

None

Components

Fix versions

Priority

Minor