$exists:false not working correctly

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.9.0
    • Affects Version/s: 1.6.0
    • Component/s: Querying
    • None
    • Environment:
      Ubuntu 10.4 64-bit
    • Major Change
    • Linux
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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}}})

              Assignee:
              Aaron Staple (Inactive)
              Reporter:
              david ash
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: