Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14111

Investigate changes in SERVER-34927: allow localField and foreignField with more expressive $lookup pipeline

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: manual, Server
    • Labels:
      None
    • Last comment by Customer:
      true
    • Story Points:
      5
    • Sprint:
      ServerDocs2020: Feb2 - Feb9, ServerDocs2020: Feb9 - Feb16, ServerDocs2020: Feb16 - Feb23, ServerDocs2020: Feb23 - Mar2

      Description

      Description

      Downstream Change Summary

      Previously, to determine the matching documents from the joined collection, $lookup accepted either the localField and foreignField arguments to perform an equality match or a pipeline to apply to the joined collection. After this change, the localField/foreignField arguments and the pipeline/let arguments can be used together when specifying a $lookup. For examples, see the syntax doc in WRITING-7251.

      Description of Linked Ticket

      This proposes closing SERVER-29376 and instead allowing combination of both, localField and foreignField and expressive pipeline.

      {$lookup:{from:"other",
                      localField:"l",
                      foreignField:"f",
                      as:"fromOther"
                      [, pipeline: [ ... ] ]  /* optionally add a pipeline to apply *after* equality join */
      

      This allows preserving the non-expressive lookup equality semantics with additional flexibility of using anything along with it like $sort and $limit etc.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jason.price Jason Price
              Reporter:
              backlog-server-pm Backlog - Core Eng Program Management Team
              Participants:
              Last commenter:
              Jason Price Jason Price
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                33 weeks, 4 days ago
                Date of 1st Reply: