[SERVER-2689] Inconsistent behavior when combining $all with other operators Created: 06/Mar/11 Updated: 15/Feb/13 Resolved: 25/Nov/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Querying |
| Affects Version/s: | 1.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Oliveira | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 32bit, MongoDB 1.6.5 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
When $all is combined with other operators (ie: $in, $gt, $lt), the results are not the expected. Example: > db.x.find({x:{ $in: ["a","b"] }}); return all the documents > db.x.find({x:{ $all: ["c"] }}); return all the documents > db.x.find({x:{ $in: ["a","b"], $all: ["c"] }}); should return all the documents having "a" or "b" as values and having "c" as value (the 3, 6, 7 and 8) - the intersection of both queries. Instead, return nothing. mongodb-user theread: http://groups.google.com/group/mongodb-user/browse_thread/thread/4033cd8335f7261e |
| Comments |
| Comment by David Oliveira [ 08/Jun/12 ] |
|
2.0.6 seems to not have this issue. Fixed. |
| Comment by Shannon Weyrick [ 08/Jun/12 ] |
|
FYI, this appears fixed as of at least 2.1.2-pre. Test case attached. |
| Comment by Eliot Horowitz (Inactive) [ 26/May/11 ] |
|
Not specifically. |
| Comment by Sebastian S. [ 25/May/11 ] |
|
do you already have an idea, when this bug will get fixed? I'm stucked at a project at this specific point... |