Closed reta closed 1 month ago
@sothawo would really appreciate a review when you have some time, thank you
tomorrow, been busy this week 😁
Thanks for the PR, I just think that the
mappedName
should be calledmappedTypeName
so that it will not be confused with the field name, that is mapped as well from the Java property name to theField.name
attribute
Thanks a lot for the review @sothawo , comments addressed! Thanks again!
In Spring Data OpenSearch [1], which is built on top of Spring Data Elasticsearch, we are running into cases where both projects differ in incompatible ways. One of such cases is supported mapping field types (baked by
org.springframework.data.elasticsearch.annotations.FieldType
), for example:would have to become
for OpenSearch.
This pull request adds optional
mappedName
attribute to@InnerField
and@Field
annotations (and model classes respectively), to address the possible divergence, for example:It would require a bit more work for OpenSearch users but not the Elasticsearch ones. The change would be non-breaking (defaults to
""
andFieldType::getMappedType
) and work seamlessly.Closes https://github.com/spring-projects/spring-data-elasticsearch/issues/2942