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

$not + $nin incorrectly matches documents

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.2.0
    • Querying
    • None
    • ALL

    Description

      I'm currently trying to make use of $not and $nin.

      db.item.find({'tags': {'$not':

      {'$nin': [1, 2, 3, 4]}

      }})

      In theory this should return items that don't have any tags other than the ones specified, in actuality it seems to turn it into $in.

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            mcilrain Noah McIlraith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: