[SERVER-10889] maxdistance result of geoNear not scaled properly Created: 25/Sep/13  Updated: 11/Jul/16  Resolved: 20/Aug/14

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

Type: Bug Priority: Trivial - P5
Reporter: Tim van Kasteren Assignee: Siyuan Zhou
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 3.2.0-51-generic #77-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux


Operating System: ALL
Steps To Reproduce:

(run in pymongo, python 2.7.3 64 bit)
result =dBase.command("geoNear",collectionName, near=point, spherical=True, limit=queryLimit, distanceMultiplier=earthRadiusInKilometers, query=query)

print "Average distance: " + str(result['stats']['avgDistance']) + " meter, maximum distance: " + str(result['stats']['maxDistance']) + ' meter.'

Output:
Average distance: 6963.35103921km, maximum distance: 0.00370436105903km.

Participants:

 Description   

Using the geoNear command returns a structure that contains stats such as number of documents scanned, average distance and maximum distance. When using the distanceMultiplier parameter (to get values in meters, rather than degrees), the average distance is properly scaled using the distance multiplier, but the maximum distance is not scaled.



 Comments   
Comment by Siyuan Zhou [ 20/Aug/14 ]

This was fixed in 2.6

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