elasticsearch update mapping conflict exception
<p>I have an index named "myproject-error-2016-08" which has only one type named "error".</p>

<p>When I hit :</p>

<pre><code>GET myproject-error-2016-08/_mapping
</code></pre>

<p>It returns following result:</p>

<pre><code>{
   "myproject-error-2016-08": {
      "mappings": {
         "error": {
            "properties": {
               ...
               "responseCode": {
                  "type": "string"
               },
               ...
            }
         }
      }
   }
}
</code></pre>

<p>I need to update the responseCode to not_analyzed,
hence I am using following following reuest :</p>

<pre><code>PUT myproject-error-2016-08/_mapping/error
{
   "properties": {
      "responseCode": {
         "type": "string",
         "index": "not_analyzed"
      }
   }
}
</code></pre>

<p>And getting following exception :</p>

<pre><code>{
   "error": {
      "root_cause": [
         {
            "type": "illegal_argument_exception",
            "reason": "Mapper for [responseCode] conflicts with existing mapping in other types:\n[mapper [responseCode] has different [index] values, mapper [responseCode] has different [doc_values] values, cannot change from disabled to enabled, mapper [responseCode] has different [analyzer]]"
         }
      ],
      "type": "illegal_argument_exception",
      "reason": "Mapper for [responseCode] conflicts with existing mapping in other types:\n[mapper [responseCode] has different [index] values, mapper [responseCode] has different [doc_values] values, cannot change from disabled to enabled, mapper [responseCode] has different [analyzer]]"
   },
   "status": 400
}
</code></pre>

<p>I have also tried following:</p>

<pre><code>PUT myproject-error-2016-08/_mapping/error?update_all_types
{
...
}
</code></pre>

<p>But it returned the same response.</p>

<p>Elastic Search is :</p>

<pre><code>$ ./elasticsearch -version
Version: 2.3.5, Build: 90f439f/2016-07-27T10:36:52Z, JVM: 1.8.0_91
</code></pre>