[DOCS-5761] Clarify why order of sort() and limit() don't affect order of find() results Created: 01/Jul/15  Updated: 30/Oct/23  Resolved: 01/Nov/22

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

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: bite-sized, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu12

Location: http://docs.mongodb.org/manual/reference/method/db.collection.find/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36
Referrer: https://www.google.de/
Screen Resolution: 1920 x 1200
repo: docs
source: reference/method/db.collection.find


Participants:
Days since reply: 1 year, 14 weeks, 1 day ago
Epic Link: DOCSP-1769
Story Points: 0.25

 Description   

Hello Sir/Madam,

It's not clear if the limit returns the first documents and based on which order they are returned.

Also the order of combining command:
find().sort().limit
and
find().limit().sort()
is not clear why is equivalent! I expect for the fist line to sort then to return the fist "n" documents while the second command I expect to return the "n" documents then to sort them

It will be helpful it you add more explanation here.

Best regards,
Naseem



 Comments   
Comment by Education Bot [ 01/Nov/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

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