I have a list of coordinates for each of them I need to perform $geoIntersects query. For one coordinate the query looks like this:
db.polygons.find({
geometry: {
$geoIntersects: {
$geometry: {
type: "Point", coordinates: [24.053640, 49.812427]
}
}
}
})
The problem is that there is a list of input coordinates and for each of them I need to find a polygon. The only way I've found so far is to iterate over them in application code and execute query N times.
Is it possible to do it with one MongoDB query? If not, any ideas on how this can optimized are appreciated.