title: How to (persistently) update the index.number_of_replicas setting in Elasticsearch without restarting the cluster?
body: <p>In a running Elasticsearch cluster, the index.number_of_replicas setting in the configuration file is 1.</p>
  
  <p>I could update this to 2 on a running cluster, by running</p>
  
  <pre><code># curl -XPUT "http://127.0.0.1:9200/_settings?pretty" \
     -d '{ "index": {"number_of_replicas":2}}'
  {
    "acknowledged" : true
  }
  </code></pre>
  
  <p>Elasticsearch immediately creates the extra replicas for existing indexes.</p>
  
  <p>However, newly created indexes have only 1 replica. How can the setting be persisted for newly created indexes too?</p>