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
If I let Spring Boot automatically create my index and its mapping, it respects the @Document(dynamic = Dynamic.False) attribute. But if I "manually" set my mapping via IndexOperations#putMapping, the dynamic property is ignored.
Here, we use JSON to convert it, and it seems to be included there.
I'm currently creating the index (without mapping), then utilizing IndexOperations#putMapping to add the mapping. I guess I should be including the mapping when I create the index, but it's difficult to do so without "losing" the power of this library (Spring Boot Elasticsearch).
The text was updated successfully, but these errors were encountered:
The created PutMappingRequest should indeed contain more than just the properties. Would be a nice opportunity to see if the json conversion vodoo is still needed for the create, this is from the first versions of the new Elasticsearch client.
If I let Spring Boot automatically create my index and its mapping, it respects the
@Document(dynamic = Dynamic.False)
attribute. But if I "manually" set my mapping viaIndexOperations#putMapping
, thedynamic
property is ignored.Looking at this method, I think something is missing here:
https://github.com/spring-projects/spring-data-elasticsearch/blob/main/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java#L241
Compare that with the create method:
https://github.com/spring-projects/spring-data-elasticsearch/blob/main/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java#L151
Here, we use JSON to convert it, and it seems to be included there.
I'm currently creating the index (without mapping), then utilizing
IndexOperations#putMapping
to add the mapping. I guess I should be including the mapping when I create the index, but it's difficult to do so without "losing" the power of this library (Spring Boot Elasticsearch).The text was updated successfully, but these errors were encountered: