Searching geo data for all documents that contains a particular point

Hi All

Looking for a solution to a geo search I'm trying to perform. This thread is very close to what I need but not quite 100%.

Essentially we have a bunch of shapes defined in an index. The shapes could be polygons or lines or points. Then we have a datafeed of positions. For each position we receive we need to determine what (if any) shapes those positions are within or landing in in the case of lines and points.

The example I found is here -> Geoquery Against Pre-Indexed Shape is Failing [Second Try] and https://gist.github.com/missinglink/d5d37082303bfdb5529c#file-gis-pre-indexed-sh-L50

Its not quite what we are looking for as it looks to me like the search requires a specified shape to search within. We need to search across ALL shapes in the shapes index to return any results that the given point is within.

Does anyone have some insights into this and willing to share?

Thanks

1 Like

Wouldn't be enough to run a geo_shape query for every position?

Tks Ignacio

Yes

I've figured out the issue with the query now. had to create a proper mapping that had a type of geo_shape and reference it in the query.

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