Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-73204

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

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

      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@mongodb.com Ben Shteinfeld
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: