Update mongos planning for $search pipelines to support a custom sort

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0, 6.0.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • v6.0
    • QO 2023-02-20, QO 2023-03-06, QO 2023-03-20
    • 35
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Rough sequence of events:

      1. mongos receives $search query
      2. mongos send planShardedSearch to mongot and receives a custom sort spec
      3. mongos builds shards pipeline with $_internalSearchMongotRemote stage, passing the custom sort
      4. mongos builds merging pipeline with $mergeCursors, also passing the custom sort

      The assumption is that each shard will continue to populate the $sortKey as it does today, so the ARM/$mergeCursors should not need to be updated to support this but we should build it (step #4) with the correct spec for explain purposes.

              Assignee:
              Ben Shteinfeld
              Reporter:
              Nicholas Zolnierz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: