|
InĀ SERVER-85694 we saw a bug here which was pretty hard to track down due to the unintuitive nature of how this works. In this ticket we suggest trying out:
- Clear lifecycle phases for a sharded $search or $searchMeta. For example, it is parsed as $search and only in 'distributedPlanLogic' would it call 'planShardedSearch'. With that done, it would stop being a $search and become a $internalSearchMongotRemote plus the merging pipeline.
- removing the special cases for 'pExpCtx->needsMerge' from $internalSearchMongotRemote and friends. It should be clear from the setup of the stages whether you need to merge or not.
|