[DOCS-4672] Comment on: "manual/reference/method/cursor.sort.txt" - conflicting statements Created: 15/Jan/15  Updated: 30/Oct/23  Resolved: 03/Apr/15

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

Type: Bug Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows
Node.js

Location: http://docs.mongodb.org/manual/reference/method/cursor.sort/
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Referrer: http://docs.mongodb.org/manual/reference/method/cursor.snapshot/
Screen Resolution: 1366 x 768
repo: docs
source: reference/method/cursor.sort


Participants:
Days since reply: 8 years, 45 weeks, 5 days ago

 Description   

Hi,

Thanks for very concise and informative documentation on Mongodb.

I found a conflicting statement on the use of combination of sort and limit with 'find' method. The page on sort says that we should limit the cursor size so that sorting is applied only on the limited set of data. But the page on find method states that find().sort().limit() will be treated in the same was as find().limit().sort() and limit() shall always be carried after find and sort operations. Which means that sorting cannot be carried out on limited set of found data.

Can you please clear my doubt on this. I want to limit the data before applying sort on it as otherwise my application is crashing because of size of data in collection.

Thanks,
Mani



 Comments   
Comment by Githook User [ 03/Apr/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4672 clarify sort and limit
Branch: master
https://github.com/mongodb/docs/commit/47f35bc9bfeec1ad8cedc9eaa428f9bd73d49f9f

Comment by Githook User [ 03/Apr/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4672 clarify sort and limit

Conflicts:
source/reference/method/cursor.sort.txt
Branch: v2.6
https://github.com/mongodb/docs/commit/ddd7afb598694146a5bb390c8464247cd433b300

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