Geographical queries

I have several questions regarding geographical queries,

  1. is it possible when doing a shape or polygon query to use the shape or polygon queries of another document, and not have to pass this information through the network, so basically you could refer to a field in another document in your query.

  2. is it possible to make a search on multiple fields in a document that represent coordinates, for example

    foo{
    Location:[Lat,Long],
    SecondaryLocation:[Lat,Long]
    }

3.is it possible to ask for all the points that fall within a shape or polygon or distance from a point but also specify not to return any point that do or do not fall within another polygon, so basically a Inner join or Left or right join.

4.is it possible to combine shape or polygon queries with GeoHashing, for example do a query that says give me all the document that fall within this GeoHash but do or do not fall in this polygon, again a inner join or left or right join scenario.

finally what are the performance implications?

I think you might want to look at https://www.elastic.co/guide/en/elasticsearch/reference/6.2/query-dsl-geo-shape-query.html#_pre_indexed_shape

Thanks for your reply, do you have any info on item 3 or 4?

  1. Yes. I guess with a bool query with a filter clause (for what must match) and a must_not clause for what must not..

  2. I guess so with the same solution I gave in 3. Not an expert on that though...

1 Like

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