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

Investigate whether we need to sort on searchScore when storedSource is true in $search

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 4.4.14, 6.0.0-rc0, 5.3.1, 5.0.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change
    • ALL
    • v5.3, v5.0, v4.4
    • QO 2022-04-04

      In a sharded environment, we currently add a sort while merging as part of the idLookup stage. However, idLookup is omitted when the storedSource flag is set on the search query, so the results may be merged in a different order. If users expect this implied sort, this could be considered a bug.

      It is also worth noting that this blocks running stages in parallel on the shards after the idLookup. If we add this to storedSource, those queries could take a performance hit.

            Assignee:
            ted.tuckman@mongodb.com Ted Tuckman
            Reporter:
            ted.tuckman@mongodb.com Ted Tuckman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: