SERVER-131820ClosedFixed

Shard-side merge of a sharded $search query loses SEARCH_META metadata cursors

h2. Summary When mongos delegates the merging half of a sharded {{$search}} query that references {{$$SEARCH\_META}} to a shard, the metadata {{$mergeCursors}} that mongos injected into the {{$setVariableFromSubPipeline}} sub\-pipeline does not survive serialization to the merging shard. The shard reparses the sub\-pipeline as the bare {{planShardedSearch}} metaPipeline \(e.g. {{\[$group, $facet, $replaceRoot\]}}\), whose front stage requires an input source, and the first {{doGetNext\(\)}} hits

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10249.0.9
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
dino-search