-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Fully Compatible
-
Query 11 (03/14/16), Query 12 (04/04/16), Query 13 (04/22/16), Query 14 (05/13/16)
-
(copied to CRM)
In the scenario where the agg pipeline is:
{$lookup:{from:"c2",localField:"foo",foreignField:"bar",as:"c2s"}}, {$unwind:"$c2s"}, {$match:{"c2s.f2":someValue}}
we should be able to merge the query for f2:someValue into the query into "c2" as find:{bar:"$foo", f2:someValue} as a performance optimization.
- is duplicated by
-
SERVER-4506 aggregation: optimize by pushing matches to earlier in a pipeline
- Closed
- related to
-
SERVER-51303 Lookup stage followed by $match on type uses wrong field in matching condition
- Closed
-
SERVER-29618 $geoWithin in aggregation pipeline after $lookup and $unwind returns incorrect results
- Closed
-
SERVER-27213 Two $match stages combine incorrectly, yielding incorrect results.
- Closed