Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3364

Add score threshold into Scorer.score()

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core/query/scoring
    • None
    • New

    Description

      This is an optimization for scoring.
      Given a Scorer.score() implementation, where features are gathered to calculate a score.

      Proposal, add a parameter to score, e.g. score(float threshold)

      This threshold is the minimum score to "beat" to make it to the current PriorityQueue. This could potential save a great deal of wasted calculation in the cases where recall is large.

      In our case specifically, some of the features needed to do calculation can be expensive to obtain, it would be nice to have a place to decide whether or not even fetching these features are necessary.

      Also, if we know the score would be low, simply threshold can be returned.

      Let me know if this makes sense and I can work on a patch.

      Attachments

        Activity

          People

            Unassigned Unassigned
            john.wang@gmail.com John Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: