# Unable to use coordinates map

**URL:** <https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609>\
**Category:** Elasticsearch\
**Created:** [April 19, 2019, 11:03am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609 "2019-04-19T11:03:30Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 23, 2019, 6:10am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/21 "2019-04-23T06:10:57Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 23, 2019, 6:12am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/22 "2019-04-23T06:12:39Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 6:03am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/23 "2019-04-26T06:03:54Z")

</div>

Even though I did deleted the previous index and created a new one still I am getting the same error  
Let me repeat what I did:

1. Deleted the index
2. Run the script in dev tools
3. Created the index with same name  
Still the error is there

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 26, 2019, 6:05am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/24 "2019-04-26T06:05:51Z")

</div>

Please show us the exact steps you did so we can recreate it and-or spot any errors.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 6:32am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/25 "2019-04-26T06:32:38Z")

</div>

how can i show???shall I paste the grok? shall i paste the indices created?? Please Tell me

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 26, 2019, 6:59am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/26 "2019-04-26T06:59:58Z")

</div>

Show us how you add the template through dev tools. Then copy a sample document and index it into a new index that matches the template using dev tools. Then show us the result.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 7:00am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/27 "2019-04-26T07:00:19Z")

</div>

okay

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 7:03am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/28 "2019-04-26T07:03:56Z")

</div>

This is how I add template  
PUT \_template/logstash\_template  
{  
"index\_patterns": ["logstash\_apchelogs"],  
"settings": {  
"number\_of\_shards": 5  
},  
"mappings": {  
"doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}  
Sample document  
192.168.200.122 - - [16/Apr/2019:08:53:53 +0530] "GET / HTTP/1.1" 200 82179 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"

Now I can the template through dev tools..but how will I copy sample document and index it into a new index that matches the template using dev tools

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 26, 2019, 7:40am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/29 "2019-04-26T07:40:11Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Here you are pasting a line of logs, not a JSON document that someone can index to check your template.

Also note `logstash_apchelogs` sounds may be a bad index name. May be it does not match your actual index name.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 8:41am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/30 "2019-04-26T08:41:08Z")

</div>

> [@dadoonet](#):
>
> n as exp

Sure I will

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 8:43am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/31 "2019-04-26T08:43:03Z")

</div>

This is how I add template  
PUT \_template/logstash\_template  
{  
"index\_patterns": ["logstash\_apchelogs"],  
"settings": {  
"number\_of\_shards": 5  
},  
"mappings": {  
"doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}  
Sample document:  
192.168.200.122 - - [16/Apr/2019:08:53:53 +0530] "GET / HTTP/1.1" 200 82179 "-" "Mozilla/5.0  
(Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"

Now I can create the template through dev tools..but how will I copy sample document and index it into a new index that matches the template using dev tools

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 8:48am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/32 "2019-04-26T08:48:04Z")

</div>

I am pretty sure to put the correct name..the JSON format is as follows.But I don't Understand shall I paste all the contents or something specific...still I am pasting all the contents. If you anything specific among that please let me know  
{  
"\_index": "logstash\_apchelogs",  
"\_type": "doc",  
"\_id": "TbI9WGoB0ZVE1U9zAm2x",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"geoip": {  
"country\_code2": "US",  
"continent\_code": "NA",  
"location": {  
"lon": -88.2049,  
"lat": 41.8251  
},  
"city\_name": "Warrenville",  
"region\_code": "IL",  
"country\_code3": "US",  
"timezone": "America/Chicago",  
"country\_name": "United States",  
"latitude": 41.8251,  
"ip": "131.225.23.167",  
"postal\_code": "60555",  
"longitude": -88.2049,  
"dma\_code": 602,  
"region\_name": "Illinois"  
},  
"verb": "GET",  
"auth": "-",  
"referrer": ""[http://www.rrcat.gov.in/](http://www.rrcat.gov.in/)"",  
"clientip": "131.225.23.167",  
"@version": "1",  
"host": "traineeserver",  
"message": "131.225.23.167 - - [22/Apr/2019:03:36:29 +0530] "GET /images/gandhi-150.png HTTP/1.1" 304 - "[http://www.rrcat.gov.in/](http://www.rrcat.gov.in/)" "Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko"",  
"ident": "-",  
"@timestamp": "2019-04-26T06:02:34.100Z",  
"timestamp": "22/Apr/2019:03:36:29 +0530",  
"httpversion": "1.1",  
"path": "/elk/Weblog/access\_log\_web1-20190422",  
"response": "304",  
"request": "/images/gandhi-150.png",  
"agent": ""Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko""  
},  
"fields": {  
"@timestamp": [  
"2019-04-26T06:02:34.100Z"  
]  
},  
"sort": [  
1556258554100  
]  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 26, 2019, 9:55am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/33 "2019-04-26T09:55:15Z")

</div>

The template specifies the geo point field to be `location` at the base of the document but the document you showed us stored the geo point in `geoip.location` instead, which does not match the mapping. Either correct the mapping or the documents so they match.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 9:58am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/34 "2019-04-26T09:58:16Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> e of t

How can I correct it???

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 26, 2019, 10:03am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/35 "2019-04-26T10:03:59Z")

</div>

**Please format your code, logs or configuration files.**

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_singh1/32/42119_2.png) [@Vikash\_Singh1](https://discuss.elastic.co/u/Vikash_Singh1)\
**Post date:** [April 26, 2019, 10:18am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/36 "2019-04-26T10:18:59Z")

</div>

> [@Vikash\_Singh1](#):
>
> ```
> PUT _template/logstash_template
> {
> "index_patterns": ["logstash_apchelogs"],
> "settings": {
> "number_of_shards": 5
> },
> "mappings": {
> "doc": {
> "properties": {
> "location": {
> "type": "geo_point"
> }
> }
> }
> }
> }
> 
> ```

I guess you meant to say :  
PUT \_template/logstash\_template  
{  
"index\_patterns": ["logstash\_apchelogs"],  
"settings": {  
"number\_of\_shards": 5  
},  
"mappings": {  
"doc": {  
"properties": {  
"geoip.ip": {  
"type": "geo\_point"  
}  
}  
}  
}  
}  
I should change something like this????

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 24, 2019, 10:19am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/37 "2019-05-24T10:19:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

[Previous page](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609.md?page=1)
