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

Add syntax to express $lookup-$unwind with a single aggregation stage

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Query

      When performing a $lookup to pull in data from single document in another collection the result is persisted as an array (a single element array). A subsequent $unwind is often necessary to make working with this array easier.

      It would be good if $lookup had a switch that allowed it to automatically do this unwind if a single result is detected.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            aharris Andrew Harris
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: