-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
QI 2024-06-10
-
200
The code to construct DocumentSourceInternalSearchMongotRemote is tricky to work with and brittle to extend since some fields are set based on the values of fields in the spec and some are set separately. It's especially confusing for fields like mongotDocsRequested/limit, requiresSearchSequenceToken, metadataMergeProtocolVersion, and requiresSerachMetaCursor since those fields are included in the spec but some are set via explicit constructor arguments rather than from the spec. Because of the spec, this is also confusing in DocumentSourceSearch, where some fields are stored doubly in the spec and the document source.
This is a direct result of there being so many ways this stage could be constructed (desugared from $search on mongos, likewise on mongod, constructed directly on mongod from a mongos request). We should make an effort to commit to a clear strategy of passing this information around.
This work may be unnecessary is we plan to do remove $_internalSearchMongotRemote in SERVER-84652 in the near future.
- is depended on by
-
SERVER-89448 Set min/max DocsNeededBounds for sharded $search
- Closed
- related to
-
SERVER-90941 Use the IDL "query_shape" option to serialize InternalSearchMongotRemoteSpec
- Backlog
-
SERVER-90943 Pass only InternalSearchMongotRemoteSpec to mongot_cursor::establishCursorsForSearchStage
- Closed
-
SERVER-90945 Make requiresSearchSequenceToken non-optional in InternalSearchMongotRemoteSpec
- Closed