# Geo\_point - no compatible types

**URL:** <https://discuss.elastic.co/t/geo-point-no-compatible-types/32667>\
**Category:** Kibana\
**Created:** [October 21, 2015, 11:58am UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667 "2015-10-21T11:58:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![schilwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/schilwan/32/14206_2.png) [@schilwan](https://discuss.elastic.co/u/schilwan)\
**Post date:** [October 21, 2015, 11:58am UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/1 "2015-10-21T11:58:24Z")

</div>

I am getting the no compatible types message from Kibana and cannot figure out why. I am getting the geo details using logstash as per below

> geoip {  
> source =\> "ipAddress"  
> target =\> "geometry"  
> database =\> "/etc/logstash/GeoLiteCity.dat"  
> add\_field =\> ["[geo\_point][coordinates]", "%{[geo\_point][longitude]}" ]  
> add\_field =\> ["[geo\_point][coordinates]", "%{[geo\_point][latitude]}" ]  
> }

However, in Kibana get the following message:  
No Compatible Fields: The "mapdata" index pattern does not contain any of the following field types: geo\_point

The mapping shows the location as a double as oppose to geo\_point which is probably why I am getting the error, however shouldn't logstash be passing the location as a geo\_point in the first place?.

> "geo\_point": {  
> "properties": {  
> "latitude": {  
> "type": "double"  
> },  
> "location": {  
> "type": "double"  
> },  
> "longitude": {  
> "type": "double"  
> }  
> }  
> },

When I look at a record in particular the location field I do get a lat, long from the data.  
location": [-0.12999999999999545,51.5],

Do I need to configure the mapping of the data types before data is loaded? Not sure why the type is not geo\_point

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 21, 2015, 12:08pm UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/2 "2015-10-21T12:08:10Z")

</div>

> The mapping shows the location as a double as oppose to geo\_point which is probably why I am getting the error, however shouldn't logstash be passing the location as a geo\_point in the first place?

There is no geo\_point type in JSON, which is what Logstash is passing to ES.

You have to modify the mapping if you want the geo\_point field to have the geo\_point type. This is typically done by modifying the index template that's applied for Logstash's indexes. In the default index template only the geoip field is mapped as geo\_point.

---

<div class="post-metadata">

**Author:** ![schilwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/schilwan/32/14206_2.png) [@schilwan](https://discuss.elastic.co/u/schilwan)\
**Post date:** [October 21, 2015, 1:21pm UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/3 "2015-10-21T13:21:27Z")

</div>

Thanks for responding

So, if I am understanding you correctly I need to create the mapping before the data is in Elasticsearch? Can it be amended after?

When I do this on an index that has not been created:

> PUT /example1/\_mapping/mygeodata  
> {  
> "mygeodata": {  
> "properties": {  
> "geo\_point": {  
> "properties": {  
> "location": {"type": "geo\_point"}  
> }}}}  
> }

I get told its missing an index which makes sense.

> {  
> "error": "IndexMissingException[[example1] missing]",  
> "status": 404  
> }

When I try to amend the type after it exists I get:

> "error": "MergeMappingException[Merge failed with failures {[mapper [geo\_point.location] of different type, current\_type [double], merged\_type [geo\_point]]}]",

So I though create my own template but hasn't made much of a difference, as its not loading the data in using this template

> PUT /\_template/my\_example  
> {  
> "template": "example\*",  
> "order": 1,  
> "settings": {  
> "number\_of\_shards": 4  
> },  
> "mappings": {  
> "properties": {  
> "geo\_point": {  
> "properties": {  
> "location": {"type": "geo\_point"}  
> }}}  
> }  
> }

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 21, 2015, 2:49pm UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/4 "2015-10-21T14:49:18Z")

</div>

> So, if I am understanding you correctly I need to create the mapping before the data is in Elasticsearch? Can it be amended after?

An index's mapping of a field can't be modified. A mapping can be set via an index template (i.e. the mapping is applied automatically when the index is created), explicitly as part of the index creation request, or (I think) after index creation if the field hasn't been mapped yet.

> So I though create my own template but hasn't made much of a difference, as its not loading the data in using this template

And after creating this index template you create an index named, say, example-foo and that index doesn't have the geo\_point field correctly mapped?

---

<div class="post-metadata">

**Author:** ![schilwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/schilwan/32/14206_2.png) [@schilwan](https://discuss.elastic.co/u/schilwan)\
**Post date:** [October 21, 2015, 3:28pm UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/5 "2015-10-21T15:28:56Z")

</div>

I created an index and added the mapping and this worked. So as you suggested an index cannot be modified after its created, I thought I could.

My original load from logstash was just loading the data and did not configure the type as geo\_point but as a double. As json input/load recognised the field type as double. So by configuring the mapping upfront this worked for me.

> PUT /example1/

> PUT /example1/\_mapping/geodata  
> {  
> "geodata": {  
> "properties": {  
> "geo\_point": {  
> "properties": {  
> "location": {"type": "geo\_point"}  
> }}}}  
> }

Thanks again

---

<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:** [July 6, 2017, 2:10pm UTC](https://discuss.elastic.co/t/geo-point-no-compatible-types/32667/6 "2017-07-06T14:10:54Z")

</div>


