-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
Description
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.)
- documents
-
SERVER-34927 allow localField and foreignField with more expressive $lookup pipeline
- Closed