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

$subset query operator

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None

      Description

      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...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              trikko Andrea Fontana
              Participants:
              Votes:
              14 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: