SERVER-133321ClosedFixed

$lookup on a view definition with extension $search stage binds the view into its own $_internalSearchIdLookup w/ different behavior on topology

h1. Summary When \{{$lookup.from}} is a view whose pipeline desugars to a mongot-style source stage plus \{{$_internalSearchIdLookup}}, the foreign-view binding step binds the view's *own* pipeline onto that idLookup stage. On an unsharded deployment idLookup then prepends \{{$match: <documentKey>}} to the bound view pipeline, displacing the \{{PositionRequirement::kFirst}} source stage, and the query fails with: On a sharded cluster the same query succeeds. \{{$unionWith}} and \{{$gra

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-rc10229.0.9
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.