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

Illegal assertion in WANDScorer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0, master (9.0)
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Jim Ferenczi told me about an assertion error that he ran into while playing with WANDScorer.

      WANDScorer tries to not have to deal with accuracy issues on floating-point numbers. In order to do this, it turns all scores into integers by multiplying them by a scaling factor, and then rounding minimum competitive scores down and rounding maximum scores up. This scaling factor is computed in the constructor in such a way that scores end up in the 0..65536 range. Sub scorers that have a maximum score of +Infty are ignored.

      The assertion is triggered in the rare case that a Scorer returns +Infty for its maximum score when computing the scaling factor but then returns finite values that are greater than the maximum scores of other clauses when asked for the maximum score over smaller ranges of doc ids.

        Attachments

        1. LUCENE-8658.patch
          5 kB
          Adrien Grand

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: