Queries with $exists operator on indexed key return on results

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • 1.1.4
    • Affects Version/s: 1.0.0, 1.0.1
    • Component/s: Querying
    • None
    • Environment:
      Mac OS X 10.5.8 on MacBook Pro
      Tested on MongoDB releases mongodb-osx-x86_64-1.0.0 and mongodb-osx-x86_64-1.0.1
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      It seems that the $exists operator does not work on keys which have been indexed. If a key has an index, the $exists operator will never return any documents. I've attached some tests in ruby which demonstrate this, along with their output, and an example mongo console session showing that it's not just an issue with the ruby driver.

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Emily Price
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: