# Ingest geoip processor dynamic mappings not as expected

**URL:** <https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903>\
**Category:** Elasticsearch\
**Created:** [March 14, 2018, 12:33pm UTC](https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903 "2018-03-14T12:33:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David9](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david9/32/42150_2.png) [@David9](https://discuss.elastic.co/u/David9)\
**Post date:** [March 14, 2018, 12:33pm UTC](https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903/1 "2018-03-14T12:33:38Z")

</div>

I've configured the ingest geoip processor but when it creates its various fields, e.g. lat and lon, they are floats. there is no field of type 'geoip' created with the dynamic mapping. this is unexpected as i figured a processor that does geocoding would of course create data of type geoip that is suitable for using with maps in kibana.

So I guess that's not the case, that I have to explicitly create a mapping first. But I don't know precisely what mapping to create and cannot find this in the docs.

Thanks

---

<div class="post-metadata">

**Author:** ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)\
**Post date:** [March 16, 2018, 4:19pm UTC](https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903/2 "2018-03-16T16:19:56Z")

</div>

indeed, you are not mistaken. A change in the mapping is necessary to recognize this  
enriched `location` field as a `geo_point` for geo-queries to work.

I've opened a pull request to update the documentation, feel free to comment if you  
think my amendment needs improvement!

> <https://github.com/elastic/elasticsearch/pull/29114/files>

thanks!

---

<div class="post-metadata">

**Author:** ![David9](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david9/32/42150_2.png) [@David9](https://discuss.elastic.co/u/David9)\
**Post date:** [March 16, 2018, 7:44pm UTC](https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903/3 "2018-03-16T19:44:52Z")

</div>

thank you. so then as i understand it, I need to manually specify the mapping, i cannot expect dynamic mapping to work.

since you evidently have a good understanding of the processor, could I ask you to concur that this would be an appropriate mapping?

Here's some data:

> ```
> "geo_real_ip": {
> "continent_name": "North America",
> "city_name": "Bethesda",
> "country_iso_code": "US",
> "region_name": "Maryland",
> "location": {
> "lon": -77.9602,
> "lat": 39.1032
> }
> }
> 
> ```

Here's the part of the mapping I don't quite understand:

> ```
> "location": {
> "type": "geopoint", // is this correct?
> "properties": {
> "lat": {
> "type": "float"
> },
> "lon": {
> "type": "float"
> }
> }
> },
> 
> ```

---

<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:** [April 13, 2018, 8:12pm UTC](https://discuss.elastic.co/t/ingest-geoip-processor-dynamic-mappings-not-as-expected/123903/5 "2018-04-13T20:12:08Z")

</div>

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