[SERVER-1587] $exists:false not working correctly Created: 07/Aug/10 Updated: 12/Jul/16 Resolved: 06/Apr/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.6.0 |
| Fix Version/s: | 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | david ash | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 5 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 10.4 64-bit |
||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||
| Operating System: | Linux | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
When running a query with an $exists, a value of false causes the query to return 0 results. db.foo.find({value:{$exists:false}}); The only fix I found was using $not with an $exists:true db.foo.find({$not:{value:{$exists:true}}}) |
| Comments |
| Comment by Aaron Staple [ 05/Apr/11 ] |
|
I believe the examples here were fixed in |
| Comment by auto [ 05/Apr/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by Visnu Pitiyanuvath [ 02/Feb/11 ] |
|
another similar bug at |
| Comment by Andrea Spacca [ 10/Sep/10 ] |
|
I opened a similar ticket few days ago: http://jira.mongodb.org/browse/SERVER-1735 Just to inform people |