[DOCS-14111] Investigate changes in SERVER-34927: allow localField and foreignField with more expressive $lookup pipeline Created: 08/Jan/21  Updated: 13/Nov/23  Resolved: 25/Feb/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.9.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Jason Price
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-34927 allow localField and foreignField wit... Closed
Participants:
Days since reply: 2 years, 49 weeks, 6 days ago
Epic Link: DOCSP-9747
Story Points: 5

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



 Comments   
Comment by Githook User [ 25/Feb/21 ]

Author:

{'name': 'Jason Price', 'email': 'jason.price@mongodb.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14111 localField foreignField with lookup
Branch: v5.0
https://github.com/mongodb/docs/commit/2d727ae4803d7506d73ceed1c27a5473c3e3dc0d

Generated at Thu Feb 08 08:09:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.