3

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!!

Edward
  • 28,296
  • 11
  • 76
  • 121
Pat
  • 329
  • 1
  • 3
  • 11
  • Hi, how did you design your data in the end? – Florin Vîrdol Mar 13 '21 at 03:11
  • Hi, we finally created one index per model (region, department, city, neighbour), each having a geoshape property . Then we added "slim" indexes, without polygons, which contains hierarchical data. For instance, the neighbour index has a CitySlim field which defines the city id, code, name, the department id, code and name and the region id, name & code. Hope it's clear enough :) – Pat Mar 16 '21 at 17:27

0 Answers0