While this ticket does not change the promised behavior, it previously would have been possible to run certain search aggregation stages in sharded environments that would have returned incorrect results. This ticket correctly bans those pipelines, but some users may see their queries fail with the new error.
The feature banned by this ticket is enabled in 6.0
If the feature flag is disabled, $$SEARCH_META should not be allowed on sharded collections. Currently this is accomplished here during runtime. We should change this to be checked earlier when detecting that we are in a sharded collection w/o the feature flag.