How to enrich documents with geo data

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?

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.

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

When creating a Map it is possible to use "Term join" to combine the index with coordinates with anotherone that contains the data

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 will definitely work. Thank you for sharing it.

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