[DOCS-9499] Docs for SERVER-20506: Conditionally order $match with $unwind Created: 05/Dec/16  Updated: 30/Oct/23  Resolved: 24/Mar/23

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Emily Hall Assignee: Andrew Aldridge
Resolution: Won't Do Votes: 1
Labels: bi-performance, optimization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-20506 Conditionally order $match with $unwind Closed
Participants:
Days since reply: 45 weeks, 5 days ago

 Description   

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}} }
]



 Comments   
Comment by Sarah Olson [ 24/Mar/23 ]

Closing this out on the grounds that:

  • Details of this request are significantly outdated. 
  • Our documentation has evolved substantially since this request was made. 

Based on this, closing as WON'T DO. Please don't hesitate to give me a shout or to reopen if you disagree.

Comment by Adinoyi Omuya [ 03/Dec/18 ]

Reminder to document this.

Generated at Thu Feb 08 07:58:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.