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

explain should not mask negative scores

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • None
    • 2.4
    • core/query/scoring
    • None
    • Patch Available

    Description

      Explanation.isMatch() returns false for 0 or negative scores.
      Hence negative scores are omitted from the explanation.
      This causes, when using e.g. BoostingTermQuery with negative boosts, a difference between the collected doc score and the score shown by explain().

      A word on the usage of this - BTQ with negative boosts is useful for "punishing" documents for containing a term. It also allows all sorts of tricks with multiplying query boost by the BTQ boost, so you get a positive score if both boosts have the same sign but negative otherwise. - I am sure there other uses as well.

      Attachments

        Activity

          People

            doronc Doron Cohen
            doronc Doron Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: