Mongodb Component with $ geoNear Exception: geoNear command failed: {ok: 0.0, errmsg: \ "cannot receive runner request \"

I am trying to run $ geoNear with mongodb aggregate and get the following error. I tried to find the problem but can't. Any help would be greatly appreciated.

Thank!

Mistake -

aggregate failed: {
"errmsg": "exception: geoNear command failed: { ok: 0.0, errmsg: \"can't get query runner\" }",
"code": 16604,
"ok": 0
} at /Users/waseemquamar/.mongorc.js:82

      

Request -

db.retailers.aggregate([
{
 $geoNear: {
    near: { type: "Point", coordinates: [ -73.99279 , 40.719296 ] },
    distanceField: "dist.calculated",
    maxDistance: 2,
    includeLocs: "dist.location",
    num: 5,
    spherical: true
 }
}

      

Pointer - db.retailers.getIndexes ();

[
{
"v": 1,
"key": {
  "_id": 1
},
"name": "_id_",
"ns": "hw_development.retailers"
},
{
"v": 1,
"key": {
  "geolocation": "2d"
},
"name": "geolocation_2d",
"ns": "hw_development.retailers",
"background": true,
"safe": null
}
]

      

+3


source to share





All Articles