[SERVER-13538] Inconsistent geoNear result for MongoDB 2.6.0 and MongoDB 2.4.10 Created: 10/Apr/14  Updated: 10/Dec/14  Resolved: 01/May/14

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.6.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Titi Wangsa Damhore Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-13721 geoNear calculated distance discrepancy Closed
Operating System: ALL
Steps To Reproduce:

run these commands on MongoDB 2.4.10 and 2.6.0

db.runCommand({ dropIndexes: "location", index: "*" })
db.location.drop();
db.location.save({"_id":1, "position" : [-74.044628, 40.689182]})
db.location.save({"_id":2, "position" : [-74.041243, 40.700309]})
db.location.ensureIndex( {position: "2dsphere"} )
db.runCommand( { geoNear : "location" , near : { type : "Point" , coordinates: [-74.045255, 40.702554] } , spherical : true } ).results[0].dis

Participants:

 Description   

geoNear is reporting slightly different result on same dataset depending on the MongoDB version.
geoNear on a GeoJSON differ after the 3rd decimal point.

420.8260 rounded to 4 decimal points (2.6.0)
420.8223 rounded to 4 decimal points (2.4.10)



 Comments   
Comment by Kamran K. [ 01/May/14 ]

Thanks for the bug report. I'm resolving this as a duplicate of SERVER-13721 because that report has already been triaged and assigned.

Please follow that ticket for further updates on the geoNear issue.

Generated at Thu Feb 08 03:32:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.