# Map zip code to city name using elasticsearch

**URL:** <https://discuss.elastic.co/t/map-zip-code-to-city-name-using-elasticsearch/125390>\
**Category:** Elasticsearch\
**Created:** [March 23, 2018, 4:05pm UTC](https://discuss.elastic.co/t/map-zip-code-to-city-name-using-elasticsearch/125390 "2018-03-23T16:05:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madou23](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@madou23](https://discuss.elastic.co/u/madou23)\
**Post date:** [March 23, 2018, 4:05pm UTC](https://discuss.elastic.co/t/map-zip-code-to-city-name-using-elasticsearch/125390/1 "2018-03-23T16:05:35Z")

</div>

Hi all,

I'm integrating some data from a hive table to elasticsearch and everything is OK. In the hive table, I have a column that contains zip codes of cities but I don't have a column that contains the names of cities that match these zip codes. So, I'm wondering if there is a way to find cities names of these zip codes using elasticsearch while indexing ?

---

<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:** [March 23, 2018, 4:46pm UTC](https://discuss.elastic.co/t/map-zip-code-to-city-name-using-elasticsearch/125390/2 "2018-03-23T16:46:39Z")

</div>

You can use logstash (or anything else) to do a lookup at index time.

I started a blog post about this which I expect to release in a couple of weeks hopefully.

---

<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 20, 2018, 4:46pm UTC](https://discuss.elastic.co/t/map-zip-code-to-city-name-using-elasticsearch/125390/3 "2018-04-20T16:46:54Z")

</div>

Closed on April 20, 2018, 4:46pm UTC

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