Hello everyone,
I have an index of manufacturers each having warehouses in multiple locations. For example manufacturer A has Warehouse Z, X, and Y where X,Z and Y are long and lat coordinates.
I was thinking of storing the warehouses as an array of lat long points for the manufacturer document but I could not find anything about it in the documentation (or maybe I am blind for it). If this is possible, how would I structure my query then when I wanted to retrieve a list of manufacturers sorted by the distance from the closest warehouse to a search lat long value.
Maybe I am also thinking about this a wrong way? Would elasticsearch be the right place to do such queries?
This looks promising. Thank you so much, I feel like this should be a basic thing I should've known.
No worries, it's weird because Elasticsearch doesn't care, so it's not immediately obvious what to look for 