You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: elasticsearch/src/main/java/org/hibernate/search/elasticsearch/schema/impl/DefaultElasticsearchSchemaTranslator.java
Copy file name to clipboardExpand all lines: elasticsearch/src/main/java/org/hibernate/search/elasticsearch/schema/impl/ElasticsearchMappingBuilder.java
+61-22Lines changed: 61 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -40,32 +40,52 @@ final class ElasticsearchMappingBuilder {
0 commit comments