Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.7.4
-
None
-
None
-
ALL
Description
Shouldn't these two types of queries return the same results? They don't always. Why not?
Attached is a zip code database you can use to test.
Here are two queries:
> use geo
> db.zips.find({'loc': {$near:
, $maxDistance: 0.01}}).count()
3
> db.zips.find({loc: {$within: {$center: [ [40.752315, -73.977842], 0.01 ] }}}).count()
25
But...
> db.zips.find({'loc': {$near:
{x: 40.752315, y: -73.977842}, $maxDistance: 0.011 }}).count()
26
> db.zips.find({loc: {$within: {$center: [ [40.752315, -73.977842], 0.011 ] }}}).count()
26
If they're supposed to return the same results, why have them both? If they're not, what's sort of meaningful distinction is there between them?
Attachments
Issue Links
- is duplicated by
-
SERVER-2234 Sometimes geospatial requests do not return expected results
-
- Closed
-
- is related to
-
SERVER-2341 Geospacial calculations are off
-
- Closed
-