[SERVER-2057] $or with sort Created: 03/Nov/10 Updated: 18/May/12 Resolved: 03/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.6.4 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Kyle Banker | Assignee: | Aaron Staple |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
From the mailing list: ); ); ) // Uses an index }, { parts : "part4" }]}).explain() // Does not use an index }, { parts : "part4" }]}).sort( { priority : -1 }).explain() // Uses the index, but doesn't produce expected explain output }, { parts : "part4" }]}).sort( { priority : -1 }).hint( {parts: 1, priority: -1}).explain() // Here's the output (it's NOT in the form of the typical $or-like explain plan) , { "$maxElement" : 1 } ] , { "$minElement" : 1 } ] |
| Comments |
| Comment by Aaron Staple [ 03/Nov/10 ] |
|
We already have |