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

Set operations for Aggregation Framework $project

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.5.2
    • Aggregation Framework
    • None

    Description

      Currently set operations require several steps of pipeline manipulation to produce the desired result. For example, see StackOverflow: How to use MongoDB aggregation for general purpose set operations (union, intersection, difference).

      This is a feature request to add some new operations for more efficient processing in a $project pipeline stage:

      1) $seq - similar to $eq, takes two sets and returns true if equal, false if not. If two lists are passed in, treat as multi-set
      2) $ssub - is the first set a subet of the second, returns true if so
      3) $sint - takes in two sets and provides the intersection of the two
      4) $sdiff - provides the symetric difference between two sets
      5) $sunion - provides the union of two sets

      Attachments

        Issue Links

          Activity

            People

              greg.mckeon@mongodb.com Gregory McKeon (Inactive)
              stephen.steneker@mongodb.com Stennie Steneker
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: