title: Changing field type of an index to new index in Elasticsearch
body: <p>lets say that I have index that its mapping look like this:</p>
  
  <pre><code>curl -XPUT 'http://localhost:9200/oldindex/_mapping/book' -d '
     {
      "book" : {
          "properties" : {
              "title" : {"type" : "text"},
              "words" : {"type" : "text"},
              "pages": {"type": "int"}
          }
       }
     }'
  </code></pre>
  
  <p>I want to create a new index from the old index, but now I want the "words" type field to be "keyword" instead of "text":</p>
  
  <pre><code>curl -XPUT 'http://localhost:9200/oldindex/_mapping/book' -d '
         {
          "book" : {
              "properties" : {
                  "title" : {"type" : "text"},
                  "words" : {"type" : "keyword"},
                  "pages": {"type": "int"}
              }
           }
         }'
  </code></pre>
  
  <p>How can I do that? can I use "Reindex API" or there is a better solution?</p>