# Location dosen't convert to geo\_point

**URL:** https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199
**Category:** Logstash
**Created:** [May 9, 2018, 3:58pm UTC](https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199 "2018-05-09T15:58:56Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 9, 2018, 8:55pm UTC](https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199/4 "2018-05-09T20:55:08Z")

</div>

> [@akml\_kk](#):
>
> put \_template/nyc  
> {  
> "order":0,  
> "index\_patterns":"nyc",  
> "mapping":{  
> "\_default":{  
> "properties":{  
> "location ":{  
> "type":"geo\_point"  
> }  
> }  
> }  
> }  
> }

In case someone else lands upon this. If you do "GET \_template/nyc" after putting that, you will find the template has no mappings. Three changes are required. "mapping" should be "mappings" and (as Magnus pointed out in the other thread) "location " needs that space to be removed. "\_default" should be "\_default\_".

This works.

```auto
PUT _template/nyc 
 {
    "order":0,
    "index_patterns":"nyc",
    "mappings":{
      "_default_":{
        "properties":{
          "location":{
            "type":"geo_point"
          }
        }
      }
    }
 }

```

---

_[View the full topic](https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199)._
