SERVER-138871ClosedDuplicate

Ordinary $lookup inherits isHybridSearch from enclosing pipeline and enters hybrid-search-only serialization

h2. Problem {{ExpressionContext::isHybridSearch\(\)}} is inherited by sub\-pipeline expression contexts \({{expression\_context\_builder.cpp}}\). Any code that routes on it cannot distinguish "my own pipeline is hybrid search" from "I am merely nested inside a hybrid search pipeline." The clearest instance: {{DocumentSourceLookUp}}'s serialization swap \({{document\_source\_lookup.cpp}}, gated on {{\_fromNsIsAView && \_fromExpCtx\->isHybridSearch\(\)}}\) replaces the lookup's resolved pipeline

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.