[DOCS-900] $near does not specify the sort order Created: 18/Dec/12  Updated: 09/Jan/13  Resolved: 08/Jan/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ed Costello Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 6 weeks, 1 day ago

 Description   

A student in M102 asks "The video indicates that $near sorts automatically by descending distance. My interpretation of descending would be that the location the greatest distance away is listed first and the closest location is listed last which seems counter-intuitive. The documentation is non-specific for the sort order of $near. Can you please clarify this?"

And sure enough, we do not specify what "sorted by distance" means. Descending? Ascending? Can it be changed with -1?



 Comments   
Comment by auto [ 08/Jan/13 ]

Author:

{u'date': u'2013-01-08T16:40:14Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: merge: DOCS-900
Branch: master
https://github.com/mongodb/docs/commit/e0c00b80df54229011e41a9b7124faae8c34d32f

Comment by auto [ 08/Jan/13 ]

Author:

{u'date': u'2012-12-21T21:50:58Z', u'email': u'kay.kim@10gen.com', u'name': u'kay'}

Message: DOCS-900 near sort order
Branch: master
https://github.com/mongodb/docs/commit/76630f9168bddca35ad5730b3a6595c0fccffd2d

Generated at Thu Feb 08 07:39:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.