title: Create or update mapping in elasticsearch
body: <p>I am new to Elasticsearch and am currently working on implementing a <code>geo_distance</code> filter for searching. As of now my index has the following mapping (I've removed some fields):</p>
  
  <pre><code>{
  advert_index: {
     mappings: {
        advert_type: {
           properties: {
              __v: {
                 type: "long"
              },
              caption: {
                 type: "string"
              },
              category: {
                 type: "string"
              },
              **location: {
              type: "long"
              },**
  
           }
        }
     }
  }
  </code></pre>
  
  <p>The geo_distance field is going to be implemented on the location field, where an example instance looks like this: </p>
  
  <pre><code>"location": [
                 71,
                 60
              ],
  </code></pre>
  
  <p>I.e. is on geoJSON format <code>[lon, lat]</code>. </p>
  
  <p>I understand that I will have to update my index so that the location field is of type <code>geo_point</code>, as described in the documentation (<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html">mapping-geo-point</a>). It seems like I have to drop the index and create a new one, but I am not able to do this. </p>
  
  <p>Am I on the right track? I would greatly appreciate it if anyone could help me with how I could create a new index or update my existing one with the correct data type. </p>
  
  <p>Many thanks!</p>