<p dir="auto">Elasticsearch 5 introduced <a href="https://www.elastic.co/blog/elasticsearch-5-0-0-released#friendly" rel="nofollow">better handling of default settings</a>, that has no reference doc.</p>
<p dir="auto">I wonder if "dealing with defaults" could be linked from cluster settings, index settings, etc.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#Show defaults
GET /_cluster/settings?include_defaults

#Return me to default
PUT /_cluster/settings
{
   &quot;persistent&quot;: {
      &quot;xpack.monitoring.collection.interval&quot; : null
   }
} "><pre class="notranslate"><code class="notranslate">#Show defaults
GET /_cluster/settings?include_defaults

#Return me to default
PUT /_cluster/settings
{
   "persistent": {
      "xpack.monitoring.collection.interval" : null
   }
} 
</code></pre></div>
<p dir="auto">Hiya</p>
<p dir="auto">I'm starting 3 nodes, then creating a mapping, then creating a duplicate (with ignoreDuplicate=false).</p>
<p dir="auto">It is sufficient to throw the whole cluster out.  It doesn't seem to recover.</p>
<p dir="auto">Run this script a few times, and watch the server logs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!/bin/bash
curl -XGET 'http://127.0.0.1:9200/_cluster/nodes' 
curl -XDELETE 'http://127.0.0.2:9202/es_test_1/' 
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test/_mapping?ignoreDuplicates=false'  -d '
{
   &quot;properties&quot; : {
      &quot;num&quot; : {
         &quot;type&quot; : &quot;integer&quot;
      },
      &quot;text&quot; : {
         &quot;type&quot; : &quot;string&quot;
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test/_mapping?ignoreDuplicates=false'  -d '
{
   &quot;properties&quot; : {
      &quot;num&quot; : {
         &quot;type&quot; : &quot;integer&quot;
      },
      &quot;text&quot; : {
         &quot;type&quot; : &quot;string&quot;
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test_2/_mapping?ignoreDuplicates=false'  -d '
{
   &quot;properties&quot; : {
      &quot;num&quot; : {
         &quot;type&quot; : &quot;integer&quot;
      },
      &quot;text&quot; : {
         &quot;type&quot; : &quot;string&quot;
      }
   }
}
'
curl -XDELETE 'http://127.0.0.2:9202/es_test_1/' 
curl -XDELETE 'http://127.0.0.2:9202/es_test_2/' 
curl -XPUT 'http://127.0.0.2:9202/es_test_1/'  -d '
{}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_2/'  -d '
{}
'
curl -XPUT 'http://127.0.0.2:9202/_all/type_1/_mapping?ignoreDuplicates=false'  -d '
{
   &quot;properties&quot; : {
      &quot;num&quot; : {
         &quot;store&quot; : &quot;yes&quot;,
         &quot;type&quot; : &quot;integer&quot;
      },
      &quot;text&quot; : {
         &quot;store&quot; : &quot;yes&quot;,
         &quot;type&quot; : &quot;string&quot;
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/_all/type_2/_mapping?ignoreDuplicates=false'  -d '
{
   &quot;properties&quot; : {
      &quot;num&quot; : {
         &quot;store&quot; : &quot;yes&quot;,
         &quot;type&quot; : &quot;integer&quot;
      },
      &quot;text&quot; : {
         &quot;store&quot; : &quot;yes&quot;,
         &quot;type&quot; : &quot;string&quot;
      }
   }
}
'
curl -XPOST 'http://127.0.0.2:9202/_flush?refresh=true' "><pre class="notranslate"><code class="notranslate">#!/bin/bash
curl -XGET 'http://127.0.0.1:9200/_cluster/nodes' 
curl -XDELETE 'http://127.0.0.2:9202/es_test_1/' 
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test/_mapping?ignoreDuplicates=false'  -d '
{
   "properties" : {
      "num" : {
         "type" : "integer"
      },
      "text" : {
         "type" : "string"
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test/_mapping?ignoreDuplicates=false'  -d '
{
   "properties" : {
      "num" : {
         "type" : "integer"
      },
      "text" : {
         "type" : "string"
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_1,es_test_2/test_2/_mapping?ignoreDuplicates=false'  -d '
{
   "properties" : {
      "num" : {
         "type" : "integer"
      },
      "text" : {
         "type" : "string"
      }
   }
}
'
curl -XDELETE 'http://127.0.0.2:9202/es_test_1/' 
curl -XDELETE 'http://127.0.0.2:9202/es_test_2/' 
curl -XPUT 'http://127.0.0.2:9202/es_test_1/'  -d '
{}
'
curl -XPUT 'http://127.0.0.2:9202/es_test_2/'  -d '
{}
'
curl -XPUT 'http://127.0.0.2:9202/_all/type_1/_mapping?ignoreDuplicates=false'  -d '
{
   "properties" : {
      "num" : {
         "store" : "yes",
         "type" : "integer"
      },
      "text" : {
         "store" : "yes",
         "type" : "string"
      }
   }
}
'
curl -XPUT 'http://127.0.0.2:9202/_all/type_2/_mapping?ignoreDuplicates=false'  -d '
{
   "properties" : {
      "num" : {
         "store" : "yes",
         "type" : "integer"
      },
      "text" : {
         "store" : "yes",
         "type" : "string"
      }
   }
}
'
curl -XPOST 'http://127.0.0.2:9202/_flush?refresh=true' 
</code></pre></div>