-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
QO 2023-03-06
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Mongos currently unconditionally builds a metadata merging pipeline with a $setVariableFromSubPipeline stage, even if the tail of the pipeline has no reference to the search metadata ($$SEARCH_META). We can avoid this extra step by analyzing the dependencies of the pipeline suffix and do not build the extra stage if there's no reference to $$SEARCH_META.