Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
5
-
ServerDocs2020: Feb2 - Feb9, ServerDocs2020: Feb9 - Feb16, ServerDocs2020: Feb16 - Feb23, ServerDocs2020: Feb23 - Mar2
-
true
Description
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.)
Attachments
Issue Links
- documents
-
SERVER-34927 allow localField and foreignField with more expressive $lookup pipeline
-
- Closed
-