Details
-
Question
-
Resolution: Done
-
Major - P3
-
None
-
2.5.5
-
None
Description
Running the following query:
db.routeResult.find({ "customerId" : "24585", "assetId" : "451219", "coordinate" : { "$near" : [-0.0843918, 51.5136045], "maxDistance" : 0.0025232195545501768 } });
|
...on a collection with the following shape of documents:
{
|
"_id" : ObjectId("52f0f3e295e914f87d13198d"),
|
"customerId" : "23138",
|
"assetId" : "426598",
|
"coordinate" : {
|
"longitude" : -1.4841666,
|
"latitude" : 52.938473
|
}
|
...with the following geospatial index:
{ "customerId" : 1, "assetId" : 1, "coordinate" : "2dsphere"}
|
....results in the following error being raised in the mongod logs:
2014-02-05T11:50:22.473+0000 [conn2] assertion 17007 Unable to execute query: error processing query: ns=stuarttest.routeResult limit=50 skip=0
|
Tree: $and
|
assetId == "451219" First: notFirst: 0 1 4 full path: assetId
|
customerId == "24585" First: 0 1 2 3 4 notFirst: full path: customerId
|
GEONEAR field=coordinate maxdist=1.79769e+308 isNearSphere=0 First: notFirst: full path: coordinate
|
Sort: {}
|
Proj: {}
|
planner returned error: unable to find index for $geoNear query ns:stuarttest.routeResult query:{ customerId: "24585", assetId: "451219", coordinate:
|
{ $near: [ -0.0843918, 51.5136045 ], maxDistance: 0.002523219554550177 } }
|
2014-02-05T11:50:22.477+0000 [conn2] ntoskip:0 ntoreturn:50
|
Can you confirm why this might be happening?