title: Elasticsearch + Spring Boot - fields declared in camel case returned as null / 0
body: <p>Implementing elastic search (version 6.8.6) with spring boot (2.2.4) on an already working spring-boot project.</p>
  <p>I'm trying to fetch records from the repository method based on a String field, (e.g) productTitle, but value is returned as an empty array. But if I try to fetch by id, or any numeric field, the values are returned as follows.</p>
  <pre><code>{
      &quot;depreciation&quot;: 24992,
      &quot;price&quot;: 0.0,
      &quot;value&quot;: 80000,
      &quot;productTitle&quot;: null,
      &quot;dealerNotes&quot;: null,
  }
  </code></pre>
  <p>There are no problems with the data in elastic search index, as when I try to query using kibana or issue a similar GET request from postman, I can see the desired output.</p>
  <p>This is the code for repository interface:</p>
  <pre><code>public interface ESRepository extends ElasticsearchRepository&lt;Product, String&gt;{
      
      List&lt;CarUsedInstance&gt; findByProductTitle(String title);
      List&lt;CarUsedInstance&gt; findByValue(Integer value);
  }
  </code></pre>
  <p>This is the Entity class:</p>
  <pre><code>@Entity
  @Table(name = &quot;product&quot;)
  @Document(indexName = &quot;index-name&quot;, type=&quot;_doc&quot;)
  public class Product implements Serializable {
  
     @Id
      private String id;
  
      @Column(name = &quot;product_title&quot;)
      private String productTitle;
  
      /*all other fields below*/
  
  }
  </code></pre>
  <p>application.properties:</p>
  <pre><code>spring.data.elasticsearch.repositories.enabled=true
  spring.data.elasticsearch.cluster-nodes=localhost:9300
  spring.data.elasticsearch.cluster-name=elasticsearch
  </code></pre>
  <p>Dependency:</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-data-elasticsearch&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>I'm a beginner with ES+spring boot so any advice is welcomed. <strong>No other files have been changed to accommodate elastic search other than the mentioned above</strong>. Am I missing something in my code?</p>
  <p>Thanks in advance!</p>
  <p><strong>Edit 1:</strong></p>
  <p>I guess the problem might be using camel case in entity class. One more integer field that was declared in camel case was returned as 0, the default value of Integer. Could using camel case to name variables in Entity class be a problem with integrating with ES?</p>