Distance from a point to a Polygon

How to perform a distance filter from a point to a polygon and specify that the distance should be less than or equal to a field from the index ?

Something like the example

GET /my_locations/_search
{
"query": {
"bool" : {
"must" : {
"match_all" : {}
},
"filter" : {
"geo_distance" : {
"distance" : "a field from the index",
"pin.location" : {
"pin.location" : [-70, 40], [-90, 50] [...], [...]
}
}
}
}
}
}

You need to run 2 separate queries.

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