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

Add options for text command to enable/disable sorting and scoring of results.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Text Search
    • None

    Description

      It's common for users to want fts search results without incurring the cost of sorting the scored results or even having the score at all (just a match against the index). It would be nice if we added these boolean options to the text command.

      For example, return all documents that match the query but without a score

      db.collection.runCommand("text", {search: "query", score: false}})

      or return all documents that match the query with a score field but without sorting them based on that score field

      db.collection.runCommand("text", {search: "query", sort: false}})

      Attachments

        Activity

          People

            Unassigned Unassigned
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: