[DOCS-3338] Improve $near and geoNear pages to mention additional sort is not efficient Created: 02/May/14  Updated: 16/Mar/15  Resolved: 25/Jun/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.7

Type: Improvement Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: Thomas Rueckstiess
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-13569 sort() after geoNear/geoWithin find/a... Closed
Participants:
Days since reply: 9 years, 40 weeks, 6 days ago

 Description   

$near and the geoNear command sort the documents by distance, nearest to furthest. Adding an additional sort() to the query requires to sort in memory.

We should make it clearer on both pages that if the user does not require the documents in order of distance, they should use a $geoWithin instead.



 Comments   
Comment by Githook User [ 08/May/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-3338: edits to page organization and integration
Branch: master
https://github.com/mongodb/docs/commit/6bf3b02ad096f4a6e10b07aeaa361151eb074731

Comment by Githook User [ 08/May/14 ]

Author:

{u'username': u'rueckstiess', u'name': u'Thomas Rueckstiess', u'email': u'thomas@rueckstiess.net'}

Message: DOCS-3338 added note about sort order to $near and geoNear.

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/39d0b6190f511c0f2033d9efdcf9597a3f74fc20

Comment by Thomas Rueckstiess [ 02/May/14 ]

Added pull request: https://github.com/mongodb/docs/pull/1756

The wording is not great, maybe this can be improved a little. I also wasn't sure if the .. note:: box is the best way to do this.

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