# Unable to reference geo\_point type field

**URL:** https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775
**Category:** Elasticsearch
**Created:** [June 20, 2019, 10:24pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775 "2019-06-20T22:24:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![JackFS4](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JackFS4](https://discuss.elastic.co/u/JackFS4)
#### Post date: [June 20, 2019, 10:24pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/1 "2019-06-20T22:24:03Z")

</div>

I know I'm missing something simple, I have an index built from my firewall log events and in Kibana/Discover I have a SourceIPGeo.location.lat and SourceIPGeo.location.lon but when I try to make a map visualization I get the dreaded no geo\_point found in index. Would SourceIPGeo.location be the geo\_point? In my index management screen I see the two lat and lon fields listed as numbers but no entry for the SourceIPGeo.location field, it's like that field isn't being treated as a field.

---

<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: [June 21, 2019, 2:25am UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/2 "2019-06-21T02:25:57Z")

</div>

I'd suggest you have a look at [https://www.elastic.co/blog/geoip-in-the-elastic-stack](https://www.elastic.co/blog/geoip-in-the-elastic-stack) (shameless plug) as it's got a few approaches to solving this.

But you need a single point that has been appropriately mapped, and it looks like you have two individual fields.

---

<div class="post-metadata">

### Author: ![JackFS4](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JackFS4](https://discuss.elastic.co/u/JackFS4)
#### Post date: [June 21, 2019, 5:15pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/3 "2019-06-21T17:15:10Z")

</div>

I have eight fields 🙂 DestinationIPGeo.longitude, DestinationIPGeo.latitude, Destination.IPGeo.location.lon, DestinationIPGeo.location.lat and the SourceIPGeo set. In my logstash I'm using geoip to populate the fields and in my template mapping I've got the DestinationIPGeo.location and SourceIPGeo.location mapped to type geo\_point. When I pull the template from ES I don't see the correct type set for the location fields, just the two lon and lat fields set to float. According to the geoip page I need to modify the output template so ES will treat DestinationIPGeo.location as a geo\_point. Hopefully that will fix this.

Is there something I can do with scripted fields to build a geo\_point for all the indexes I've already injested?

---

<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: [June 21, 2019, 9:45pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/4 "2019-06-21T21:45:52Z")

</div>

> [@JackFS4](#):
>
> Is there something I can do with scripted fields to build a geo\_point for all the indexes I've already injested?

Unfortunately not.

---

<div class="post-metadata">

### Author: ![JackFS4](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JackFS4](https://discuss.elastic.co/u/JackFS4)
#### Post date: [June 25, 2019, 3:13pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/5 "2019-06-25T15:13:40Z")

</div>

The right answer here was to create a mapping template to set the correct field types when the index is created.

---

<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 23, 2019, 3:13pm UTC](https://discuss.elastic.co/t/unable-to-reference-geo-point-type-field/186775/6 "2019-07-23T15:13:41Z")

</div>

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