-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Server
-
Labels:
Engineering Ticket Description:
The subset of a $match following an $unwind that does not filter on the unwound field can be moved up in the pipeline.
For example:
[ {'$unwind' : "$x"}, {'$match' : {_id : 1, x : {'$gt': 3} } } ]
is equivalent to:
[ {'$match' : {_id : 1} }, {'$unwind' : "$x"}, {'$match' : {x : {'$gt': 3}} } ]
- documents
-
SERVER-20506 Conditionally order $match with $unwind
- Closed