Hi Nat,
here is the query and the error:
db.spot.find({$and: [ { 'locationList.loc': { $near: [ 31.88957,
35.201856 ], $maxDistance: 0.044248 } } ]})
error: {
"$err" : "can't find special index: 2d for: { $and:
[ { locationList.loc: { $near: [ 31.88957, 35.201856 ], $maxDistance:
0.044248 } } ] }",
"code" : 13038
}
following is the index :
{
"v" : 1,
"key" : {
"locationList.loc" : "2d"
},
"ns" : "KanitiKanitiProd.spot",
"name" : "locationList.loc_2d"
}
Please note that when I remove the $and from the query, it works fine,
as follows:
db.spot.find({ 'locationList.loc': { $near: [ 31.88957, 35.201856 ],
$maxDistance: 0.044248 } })