Spring Data Elasticsearch (4.x) - Using @Id forces id field in _source
问题 Summary Recently we upgraded to Spring Data Elasticsearch 4.x. Part of this major release meant that Jackson is no longer used to convert our domain objects to json (using MappingElasticsearchConverter instead) [1]. This means we are now forced to add a new id field to all our documents. Previously we had domain objects like this: import org.springframework.data.annotation.Id; public ESDocument { @Id private String id; private String field1; @JsonIgnore public String getId() { return id; }