# Elasticsearch for geo-aware Wikipedia / OSM place search?

**URL:** <https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499>\
**Category:** Elasticsearch\
**Created:** [August 17, 2015, 12:12pm UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499 "2015-08-17T12:12:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zsero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zsero/32/4220_2.png) [@zsero](https://discuss.elastic.co/u/zsero)\
**Post date:** [August 17, 2015, 12:12pm UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499/1 "2015-08-17T12:12:56Z")

</div>

I would like to implement a search-backend which returns a location-aware search results of all Wikipedia / OSM place names, while recognising place names in all languages.

Thus, if you search for "Vienna" or "Wien" from Europe it returns the location of Vienna, Austria, but if you do the same search from within the US, next to one of the many cities called "Vienna", that smaller city might appear above the EU one.

So far, I believe it needs to do the following:

1. Be geo-aware, thus for each search result it should return it's distance from a query point.

2. Handle the dozens of alternative-names of places in a smart way. For example "isafjo" should match "Ísafjörður" in an autocomplete.

3. Cache/index in a way that search results can be provided near real-time, thus allowing an autocomplete experience on the client side.

Would that be a possible / recommended / straightforward application of ElasticSearch? The database would be almost totally read-only, with write operations maybe only once a month.

---

<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:** [August 17, 2015, 10:46pm UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499/2 "2015-08-17T22:46:10Z")

</div>

It's definitely possible, but it would involve a bit of leg work with all those requirements.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 18, 2015, 6:45am UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499/3 "2015-08-18T06:45:55Z")

</div>

Check out Pelias from the guys at [Mapzen.com](http://Mapzen.com)  
They use geonames data and elasticsearch and is all open source ( bankrolled by Samsung - see [https://mapzen.com/about](https://mapzen.com/about) )

---

<div class="post-metadata">

**Author:** ![zsero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zsero/32/4220_2.png) [@zsero](https://discuss.elastic.co/u/zsero)\
**Post date:** [August 18, 2015, 11:48am UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499/4 "2015-08-18T11:48:28Z")

</div>

Thanks. I've checked it out, and although their demo didn't work for any search term I tried and it has UTF-8 bugs, at least it is an open source project.

The reference I found is geonames.org's REST API, it's super reliable and has a great fuzzy matching for names. I've found an old slide mentioning that they are using Lucene, so I guess implementing it in ElasticSearch today would be the right choice.

[![](https://i.imgur.com/YojJnXR.png) ](https://i.imgur.com/YojJnXR.png)

---

<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 5, 2017, 11:55pm UTC](https://discuss.elastic.co/t/elasticsearch-for-geo-aware-wikipedia-osm-place-search/27499/5 "2017-07-05T23:55:21Z")

</div>

Closed on July 5, 2017, 11:55pm UTC


