title: Converting keyword/string to integer field in Elasticsearch
body: <p>I have a numeric field that got auto-mapped as keyword for some reason, while I'd like it mapped as an integer.</p>
  <p>I tried adding a new index with the desired mapping:</p>
  <pre><code>PUT temp_index/
  {
    &quot;mappings&quot;: {
      &quot;properties&quot;: {
        &quot;num&quot;: {
          &quot;type&quot;: &quot;integer&quot;
        }
      }
    }
  }
  </code></pre>
  <p>And then reindexing:</p>
  <pre><code>POST _reindex
  {
    &quot;source&quot;: {
      &quot;index&quot;: &quot;main_index&quot;
    },
    &quot;dest&quot;: {
      &quot;index&quot;: &quot;temp_index&quot;
    }
  }
  </code></pre>
  <p>However, when I then look at the new <code>temp_index</code>, I still see the values of the &quot;num&quot; field being strings and not integers.</p>
  <p>What am I missing here?</p>