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

Add set/array operations to $unwind in new aggregation framework

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      $unwind operates on a single array field. sometimes tag-like information can be stored in multiple document fields. it may be useful to allow $unwind to operate on multiple array fields whose contents have been combined by some set/array operation. this could help users group by values that are contained across multiple fields.

      i.e.

      {x: [s1, s2], y: [s2, s3]}

      $unwind(x).$unwind(y) would create four documents.

      would something like $unwind($union(x,y)) and group on $union(x,y) be possible/desirable?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              kaleigh@renttherunway.com kaleigh smith
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: