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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • None
    • 4.4.14, 6.0.0-rc0, 5.3.1, 5.0.7
    • None
    • None
    • Minor Change
    • ALL
    • v5.3, v5.0, v4.4
    • QO 2022-04-04

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: