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

CustomScoreQuery Explain differs from the actual score when topLevelBoost is used.

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.8
    • 4.10.3, 5.0, 6.0
    • core/query/scoring
    • None
    • New

    Description

      CustomScoreQuery.java, doExplain has the following line:

      res.addDetail(new Explanation(getBoost(), "queryBoost"));
      

      This multiplies the custom score query by just the boost of the current query, and not by

      queryWeight=topLevelBoost*getBoost();
      

      which is the value that's actually used during scoring. This leads to drastically different scores in the debug info, relative to the actual score, when the query is a subquery of another one, like a BooleanQuery clause, with a non-1 boost.

      Attachments

        1. LUCENE-6042.patch
          16 kB
          Robert Muir
        2. CustomScoreQuery.patch
          1 kB
          Denis Lantsman

        Activity

          People

            rcmuir Robert Muir
            dlants Denis Lantsman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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