-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
Fully Compatible
-
v9.0, v8.3
-
None
-
None
-
None
-
None
-
None
-
None
-
None
DocumentSourceExtensionOptimizable::registerStage registers every extension stage with AllowedWithApiStrict::kAlways, but the built-in fallback parsers for $search, $vectorSearch and $listSearchIndexes (as of SERVER-137305) all use kNeverInVersion1. This means the same strict query can be accepted/rejected depending on whether the extension is loaded and its feature flag is enabled.
One simple approach would be to change the default to kNeverInVersion1 (kInternal for internal extension stages). We will need to consider that extension $search and $vectorSearch have already been shipped with kAlways.