How to design ElasticSearch document(s) for geo shape data?

196 Views Asked by At

I'm trying to build a geoloc service (from France only) with Elastic Search. I have several indexes to create such as country, region, county, city, neighbour containing itself a polygon. For each city, I have a list of the nearest cities to include.

How should I design this kind of data, I would like to be able to:

  1. search by coordinates
  2. search by full text
  3. search by zip code, city name, neighbour name
  4. manage faceting (n cities in n county in n region for instance)
  5. etc...

I don't know if I have to use the path Hierarchy Tokenizer pattern.

I was trying to build a unique index Neighbours by referencing the data from the bottom to the top(neighbour => city => county => region => country). But I don't know if it's a good idea regarding the volume of data. (1 country, 40 regions (old + new ones), 101 counties, 36000 cities and 7700 neighbours), especially the polygones.

Any idea?

Thanks in advance!!

0

There are 0 best solutions below