title: Configurable index name in Spring data Elasticsearch
body: <p>I am using Spring Data ElasticSearch repository and I like to give a default index name for production and another one for testing</p>
  
  <p>Here the application.properties for production:</p>
  
  <pre><code>spring.data.elasticsearch.cluster-name=elasticsearch
  spring.data.elasticsearch.cluster-nodes=localhost:9300
  spring.data.elasticsearch.repositories.enabled=true
  </code></pre>
  
  <p>Here the configuration application-test.properties</p>
  
  <pre><code>spring.data.elasticsearch.cluster-name=elasticsearch
  spring.data.elasticsearch.cluster-nodes=localhost:9300
  elasticsearch.index.name=registry-test
  spring.data.elasticsearch.repositories.enabled=true
  </code></pre>
  
  <p>The  elasticsearch.index.name does not seem to be taken in account. What is the right setting in the properties if I am using Spring Boot autoconfiguration? I cannot find any info in the Spring documentation.</p>
  
  <p>Thanks for your help.</p>