-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.8.3
-
Component/s: None
-
None
-
Environment:Windows, nothing special besides that (replicated on Win7/Server 2012)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I have a class which has an indexed GeoJsonPoint<GeoJson2DCoordinates>, using $near works perfectly well, but when I do the following:
IMongoQuery query = Query<Player>.EQ(p => p.RandomGeoIdentifier, RandomID);
return players.Find(query).SetLimit(1).Size() == 0;
It does a full table scan without using the index.
Adding a hint, causes the query to scan 1 object if exists.
return players.Find(query).SetHint("Random Geo ID").SetLimit(1).Size() == 0;
I believe this is a bug and Mongo should use this index by default.