[DOCS-6409] Comment on: "manual/tutorial/sort-results-with-indexes.txt" Created: 20/Oct/15 Updated: 03/Nov/17 Resolved: 20/Oct/15 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Bug | Priority: | Major - P3 |
| 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: |
MongoDB Manual 3.0 https://docs.mongodb.org/manual/tutorial/sort-results-with-indexes/ Location: https://docs.mongodb.org/manual/tutorial/sort-results-with-indexes/ |
||
| Participants: | |
| Days since reply: | 8 years, 17 weeks, 1 day ago |
| Description |
|
In the section of "Sort and Non-prefix Subset of an Index", the example "db.data.find( { b: 3, a: 4 }).sort( { c: 1 })" applies the index " { a: 1, b: 1, c: 1 }". Doesn't order of index make sense in "equity" query in MongoDB? In my understanding, the correct query should be "db.data.find( { a: 4, b: 3 }).sort( { c: 1 })". |
| Comments |
| Comment by Kay Kim (Inactive) [ 20/Oct/15 ] |
|
Emailed reporter clarifying which means that the query condition + sort on c does indeed match the order of the index prefix { a: 1, b: 1, c: 1 }
|