title: How to define ElasticSearch index field names for a POJO using Spring Data ElasticSearch
body: <p>I'm using Spring Data ElasticSearch to perform CRUD operations. By default, when a POJO annotated with @Document gets written to an ElasticSearch index, the index field names are the same as the POJO's Java property names.
  How can I configure the index field names to be different ?
  For example, with this Document POJO:</p>
  
  <pre><code>@Document(indexName = "areas", type = "area")
  public class Area {
  
      @Id
      private String id;
      private String countyName;
      private String postOfficeName;
      private String stateName;
  </code></pre>
  
  <p>how can I configure this so that the index field in ElasticSearch gets serialized as county_name instead of countyName ?</p>