when executing the following aggregate
db.Activities.aggregate([
{
$geoNear: {
near: { coordinates: [ -73.99279 , 40.719296 ] },
distanceField: "location.calculated",
spherical: true,
}
}
])
I am getting the following error
uncaught exception: aggregate failed: {
"errmsg" : "exception: geoNear command failed: { ok: 0.0, errmsg: \"can't get query executor\" }",
"code" : 16604,
"ok" : 0
}
when i run the geoNear command, it works fine.
db.runCommand( {
geoNear: "Activities" ,
near: [ -73.99279 , 40.719296 ],
spherical: true,
})
Any ideas what i am doing worng ?
The problems could be:
Activities
.Activities
Run this code in Mongo shell to see all the indexes
db.Activities.getIndexes()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With