# 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:** 20\
**Page:** 1

<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 19, 2019, 11:03am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/1 "2019-04-19T11:03:30Z")

</div>

Although I am having all the information regarding geo locations but when I am trying to visualize it in kibana it says:  
**No Compatible Fields:** The logstash\_apchelogs index pattern does not contain any of the following field types:geo\_point

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 19, 2019, 11:04am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/2 "2019-04-19T11:04:17Z")

</div>

What's the mapping of the index?

---

<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 19, 2019, 11:04am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/3 "2019-04-19T11:04:58Z")

</div>

mapping???

---

<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 19, 2019, 11:05am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/4 "2019-04-19T11:05:20Z")

</div>

can you please elaborate

---

<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 19, 2019, 11:16am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/5 "2019-04-19T11:16:19Z")

</div>

I guess you required this info?!!!!  
{  
"logstash\_apchelogs" : {  
"mappings" : {  
"doc" : {  
"properties" : {  
"@timestamp" : {  
"type" : "date"  
},  
"@version" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"agent" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"auth" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"bytes" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"clientip" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"geoip" : {  
"properties" : {  
"city\_name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"continent\_code" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"country\_code2" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"country\_code3" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"country\_name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"dma\_code" : {  
"type" : "long"  
},  
"ip" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"latitude" : {  
"type" : "float"  
},  
"location" : {  
"properties" : {  
"lat" : {  
"type" : "float"  
},  
"lon" : {  
"type" : "float"  
}  
}  
},  
"longitude" : {  
"type" : "float"  
},  
"postal\_code" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"region\_code" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"region\_name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"timezone" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"host" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"httpversion" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"ident" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"message" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"path" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"rawrequest" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"referrer" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"request" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"response" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"tags" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"timestamp" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"verb" : {

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 21, 2019, 8:36am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/6 "2019-04-21T08:36:41Z")

</div>

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

You don 't have anything that is mapped as a geopoint, so there is nothing for Kibana to use

> [@Vikash\_Singh1](#):
>
> "location" : {  
> "properties" : {  
> "lat" : {  
> "type" : "float"  
> },

That is what you need to fix..

---

<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 22, 2019, 4:23am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/7 "2019-04-22T04:23:17Z")

</div>

so there has to be a field named as geo point???? because i used same grok earlier also and i was able to plot it on geo map

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 22, 2019, 6:41am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/8 "2019-04-22T06:41:24Z")

</div>

It needs to be mapped as a geopoint, 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 22, 2019, 9:04am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/9 "2019-04-22T09:04:49Z")

</div>

little bit more help....how can i change the name??

---

<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 22, 2019, 10:45am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/10 "2019-04-22T10:45:38Z")

</div>

The field does not need to have a specific name, but you need to specify [the correct mapping for it](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html) e.g. through an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/7.0/indices-templates.html).

Something like this should work for the location field:

```
PUT _template/logstash_template
{
  "index_patterns": ["logstash_*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "doc": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}
```

---

<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, 4:46am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/11 "2019-04-23T04:46:35Z")

</div>

I tried doing the above method but still unable to accomplish the goal. After executing the above code it says:  
{  
"acknowledged" : true  
}  
but while using coordinates map again getting the same message.

---

<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, 5:04am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/12 "2019-04-23T05:04:57Z")

</div>

You will need to create a new index in order for the template to apply.

---

<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, 5:10am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/13 "2019-04-23T05:10:50Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> o create a new index in order for the template to appl

But I remember the last time I created index for the same logs it was working absolutely fine. But when I created indices using pipeline.yml then this happened. eventually i can't use the IP range in visualization section

---

<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, 5:11am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/14 "2019-04-23T05:11:22Z")

</div>

Shall I again create a new index with same name??

---

<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, 5:12am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/15 "2019-04-23T05:12:33Z")

</div>

Make sure the new index name matches the pattern specified in the template.

---

<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, 5:14am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/16 "2019-04-23T05:14:27Z")

</div>

Once I've created the index then I will run the above code....or shall I execute it first then create index?

---

<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, 5:32am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/17 "2019-04-23T05:32:03Z")

</div>

First register the sample template I provided. It will then be applied once you create a new matching index, e.g. `logstash_test`. Then index into the index `logstash_test` in order to create it.

---

<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, 5:39am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/18 "2019-04-23T05:39:03Z")

</div>

OK....I am just repeating what you said.....I will run the code  
PUT \_template/logstash\_template  
{  
"index\_patterns": ["logstash\_test"],  
"settings": {  
}  
}  
then I will create index naming as "logstash\_test".

---

<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, 5:41am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/19 "2019-04-23T05:41:22Z")

</div>

You need the mappings part in the template.

---

<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, 5:47am UTC](https://discuss.elastic.co/t/unable-to-use-coordinates-map/177609/20 "2019-04-23T05:47:28Z")

</div>

PUT \_template/logstash\_template  
{  
"index\_patterns": ["logstash\_test"],  
"settings": {  
"number\_of\_shards": 1  
},  
"mappings": {  
"doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}  
can i change the number of shards???

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