[CSHARP-923] Using $eq on a geospatial indexed GeoJsonPoint<GeoJson2DCoordinates> field, uses a basic cursor instead of index Created: 06/Mar/14  Updated: 05/Apr/16  Resolved: 20/Jun/14

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.8.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ron Rejwan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, nothing special besides that (replicated on Win7/Server 2012)



 Description   

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.



 Comments   
Comment by Craig Wilson [ 20/Mar/14 ]

Hi Ron, sorry for the late reply.

Can you replicate this behavior in the shell? I say that because this seems more like a server problem than a driver issue...

Thanks,
Craig

Generated at Wed Feb 07 21:38:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.