-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Each lite-parse desugar stage expander currently registers itself with its own MONGO_INITIALIZER (see the rankFusionStageExpander/scoreFusionStageExpander registration in src/mongo/db/pipeline/lite_parsed_hybrid_search_desugarer.cpp). As more stages adopt lite-parse desugaring this does not scale.
Proposal
Follow the agg-stage registration pattern: collect expanders into a map and register the whole map under one MONGO_INITIALIZER, so adding an expander is a map entry rather than a new initializer.