title: spring data elasticsearch - settings using config file
body: <p>I am using elasticsearch for my application and this the domain entity</p>
  
  <pre><code>@Document(indexName = "bookstore", type = "book", refreshInterval = "-1")
  public class Book {
      @Id
      @Column(name = "ID")
      private Long id;
  
      @Column(name = "NAME")
      @Field(type=FieldType.String)
      private String name;
  
      @Column(name = "DESCRIPTION")
      private String description;
  
      @Column(name = "PRICE")
      private Double price;
  </code></pre>
  
  <p>This is the config file</p>
  
  <pre><code>@Configuration
  @EnableElasticsearchRepositories(basePackages =
  "elasticsearch.repo")
  public class BookSearchRepositoryTestConfig {
  
  @Bean
  
  public ElasticsearchOperations elasticsearchTemplate() throws IOException {
          return new ElasticsearchTemplate(nodeBuilder()
                  .loadConfigSettings(false)
                  .local(true)
                  .settings(
                  ImmutableSettings.settingsBuilder()
                  .put("index.store.type", "memory")
                  .put("index.number_of_shards", 1)
                  .put("index.number_of_replicas", 0).build()
                  ).node().client());
  }
  </code></pre>
  
  <p>This settings doesnt work.It use defualt settings and create 5 shards.</p>
  
  <p>I know this can done by using @Document</p>
  
  <pre><code>@Document(indexName = "bookstore", type = "book", shards = 1, replicas = 0, indexStoreType = "memory", refreshInterval = "-1")
  </code></pre>
  
  <p>or using @Setting</p>
  
  <pre><code>@Setting(settingPath = "/settings/elasticsearch-settings.json")
  </code></pre>
  
  <p>But I am tring to use the config file and set the properties.
  Please guide me to solve this issue.</p>