# How to enrich documents with geo data

**URL:** <https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276>\
**Category:** Elasticsearch\
**Created:** [February 27, 2020, 4:08pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276 "2020-02-27T16:08:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wifi](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@wifi](https://discuss.elastic.co/u/wifi)\
**Post date:** [February 27, 2020, 4:08pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/1 "2020-02-27T16:08:46Z")

</div>

I have lots of documents that contain zip-codes. I want to visualize the data on a map so i need to add a geo location. To achieve this i created an index that contains coordinates for every zip-code.

How can i enrich the my documents with geo locations provided by the new index?

I wanted to create a pipeline that updates the documents but it seems like there is no way to achieve this in elasticsearch 7.3.

Is it possible to use the script processor to gather a field of a document from a different index or do i have to update to 7.6 to be able to use the 'enrich' processor for this job?

---

<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:** [February 27, 2020, 4:30pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/2 "2020-02-27T16:30:05Z")

</div>

If you want to use enrich processor, you need to upgrade.

Otherwise you can use logstash for this.  
I wrote 3 posts about that. Might be useful.

> **[Enriching Your Postal Addresses With the Elastic Stack - Part 1](https://www.elastic.co/blog/enriching-your-postal-addresses-with-the-elastic-stack-part-1)**
>
> Learn how to enrich your postal addresses using the Elastic Stack to improve search times and get better results from your geo data queries.

---

<div class="post-metadata">

**Author:** ![wifi](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@wifi](https://discuss.elastic.co/u/wifi)\
**Post date:** [February 28, 2020, 8:57am UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/3 "2020-02-28T08:57:35Z")

</div>

Thanks, I've already read this Post and I also saw the other ones about logstash.

My question is if it is possible to achieve that without using logstash or upgrade to 7.6

---

<div class="post-metadata">

**Author:** ![wifi](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@wifi](https://discuss.elastic.co/u/wifi)\
**Post date:** [February 28, 2020, 12:35pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/4 "2020-02-28T12:35:43Z")

</div>

When creating a Map it is possible to use "[Term join](https://www.elastic.co/guide/en/kibana/current/terms-join.html)" to combine the index with coordinates with anotherone that contains the data

---

<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:** [February 28, 2020, 2:15pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/5 "2020-02-28T14:15:28Z")

</div>

> [@wifi](#):
>
> My question is if it is possible to achieve that without using logstash or upgrade to 7.6

Without LS or 7.6, you can create your own application which reads the dataset with the scroll API, do whatever transformation you want and then send the document with the bulk API.

If you just want to visualize multiple sources of data on the same map, then [the solution you shared](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/4) will definitely work. Thank you for sharing it.

---

<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:** [March 27, 2020, 2:15pm UTC](https://discuss.elastic.co/t/how-to-enrich-documents-with-geo-data/221276/6 "2020-03-27T14:15:33Z")

</div>

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