Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCh-2508 Initialize the Elasticsearch embedded mappings lazily so…
… as to allow the use of container bridges Such bridges are enabled when using @field and @IndexedEmbedded on the same property. They expect the source property to be an array, Iterable or Map. When enabled, those bridges will unwrap the source property value and pass each element to the actual field bridge. For instance each integer in a List<Integer> will be passed to NumericFieldBridge.INT_FIELD_BRIDGE.set(...) in turns. This is very different from the originally intended use of @IndexedEmbedded, and in particular there is no sub-property to speak of as long as the elements in the container are not mapped themselves. Thus, if we refrain from adding the embedded mapping as long as there are no sub-properties, we allow the feature to work despite the inability for Elasticsearch to have a property mapped to both the 'object' and another, concrete datatype. See HSEARCH-2448 in particular.
- Loading branch information
Showing
3 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters