Skip to content

Avoid including @Id and @Version in the document source #2466

@anton-johansson

Description

@anton-johansson

Hey! I have a document type which has an @Id field and a @Version field. When I save this, it looks like Spring Boot Elasticsearch tries to set these on the document source in addition to the native Elasticsearch fields. Why is this? You can find the code here:
https://github.com/spring-projects/spring-data-elasticsearch/blob/main/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java#L1440

Feels very redundant to have these two properties on the document body as well.

Thoughts? Would it be possible to include some configuration to avoid this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions