Lucene - Core
  1. Lucene - Core
  2. LUCENE-1302

explain should not mask negative scores

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: core/query/scoring
    • Labels:
      None
    • Lucene Fields:
      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.

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12562622 ] jira [ 12583571 ]
        Mark Thomas made changes -
        Workflow jira [ 12432946 ] Default workflow, editable Closed status [ 12562622 ]
        Michael McCandless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Doron Cohen made changes -
        Lucene Fields [Patch Available, New] [Patch Available]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Doron Cohen made changes -
        Field Original Value New Value
        Attachment lucene-1302-explain-negative.patch [ 12383747 ]
        Doron Cohen created issue -

          People

          • Assignee:
            Doron Cohen
            Reporter:
            Doron Cohen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development