Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3747

Solr Score threshold 'reasonably', independent of results returned

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • Schema and Analysis

    Description

      Usually, search results are sorted by their score (how well the document matched the query), but it is common to need to support the sorting of supplied data too.

      Boosting affects the scores of matching documents in order to affect ranking in score-sorted search results. Providing a boost value, whether at the document or field level, is optional.

      When the results are returned with scores, we want to be able to only "keep" results that are above some score (i.e. results of a certain quality only). Is it possible to do this when the returned subset could be anything?

      I ask because it seems like on some queries a score of say 0.008 is resulting in a decent match, whereas other queries a higher score results in a poor match.

      I have written pseudo code to achieve what I said.
      Note: I have attached my code as screenshot

      double scoreLimit = 0.75 #For example
      searchResults = new Results[numberOfResults];
      boolean lastScore=false;
      solrSearchResults = Calling Solr Engine.
      for( Result result : solrSearchResults)

      { if (lastScore != false && result.score/lastScore<scoreLimit) break; lastScore = result.score; Adding new result to searchResults array }

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramzi alqrainy Ramzi Alqrainy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5h
                5h
                Remaining:
                Remaining Estimate - 5h
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified