[DOCS-2179] .find().sort( { $natural: 1 } ) disables index use Created: 30/Oct/13 Updated: 16/Mar/15 Resolved: 04/Sep/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Ryder (Inactive) | Assignee: | Tim Slavin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 9 years, 22 weeks, 5 days ago |
| Description |
|
Regarding this page: This contains a neat description of the use of .sort() specifically after a .find() and has a section at the bottom covering the special $natural operator. The page should make it clear that the use of $natural effectively disables the use of most indexes. There are some cases, particularly involving _id where $natural seems to work but these cases appear to be side-effects rather than intentional design choices. |
| Comments |
| Comment by Githook User [ 12/Sep/14 ] | |||||||||||||||||||||||||||||
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: | |||||||||||||||||||||||||||||
| Comment by Githook User [ 12/Sep/14 ] | |||||||||||||||||||||||||||||
|
Author: {u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}Message: Signed-off-by: Sam Kleinman <samk@10gen.com> | |||||||||||||||||||||||||||||
| Comment by Andrew Ryder (Inactive) [ 31/Oct/13 ] | |||||||||||||||||||||||||||||
Scenario
Results
I think the official answer is the first column is not supported. And mileage may vary. | |||||||||||||||||||||||||||||
| Comment by Andrew Ryder (Inactive) [ 30/Oct/13 ] | |||||||||||||||||||||||||||||
|
|