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

$subset query operator

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Query

      Example collection:

      { test: [1,2,3] }
      { test: [1,3] }
      { test: [2] } 
      { test: [3,4] }
      

      There's no way to get element that match a subset of an array.
      It would be useful to write something like:

      db.coll.find({ test: {$subset: [1,2,3] }})
      

      to extract all object except the last one (that contains '4'). It's something similar to a reversed $all operator...

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            trikko Andrea Fontana
            Votes:
            14 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: