Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1587

$exists:false not working correctly

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

      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 Aaron Staple
            Reporter:
            davidma7685 david ash
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: