[SERVER-6002] Query on same field with $gt/$gte and $lt/$lte ignores one end of the range Created: 05/Jun/12 Updated: 15/Aug/12 Resolved: 05/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Nic Cottrell (Personal) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
db.Example.find({ $and: [ { lc: "eng" }, { wordCount: { $gte: 4 }}, { wordCount: { $lte: 5 }}, { $or: [ { group: "transmachina" }, { group: "all" }] }, {pattern: false}, { "indices.textLc": { $in: [ "plain text", "plain", "text" ] }} ] }).explain(); gives { , { "$maxElement" : 1 } ] , { "$maxElement" : 1 } ] Note that the limit { wordCount: { $lte: 5 }} is ignored and thousands of objects are scanned needlessly |
| Comments |
| Comment by Aaron Staple [ 05/Jun/12 ] |
|
Hi Nic - This is |