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.

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Text Search
    • Labels:
      None

      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}})
      

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

              Created:
              Updated:
              Resolved: