You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Paul Elschot (JIRA)" <ji...@apache.org> on 2008/06/10 19:08:45 UTC

[jira] Issue Comment Edited: (LUCENE-1302) explain should not mask negative scores

    [ https://issues.apache.org/jira/browse/LUCENE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603933#action_12603933 ] 

paul.elschot@xs4all.nl edited comment on LUCENE-1302 at 6/10/08 10:08 AM:
----------------------------------------------------------------

> Is it somewhat strange for BQ to count a negative score contributer for its minNrShouldMatch condition?

The count of the number of matchers in BooleanQuery depends on the return values of next() and skipTo() only. It could be made to ignore scorers with a negative score value, but that would mean another option to BooleanQuery.

      was (Author: paul.elschot@xs4all.nl):
    > Is it somewhat strange for BQ to count a negative score contributer for its minNrShouldMatch condition?

The count of the number of matchers in BooleanQuery depends on the return values of next() and skipTo() only. It could be made to ignore scorers with a negative score value, but that would mean another option in BooleanScorer.
  
> explain should not mask negative scores
> ---------------------------------------
>
>                 Key: LUCENE-1302
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1302
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Query/Scoring
>            Reporter: Doron Cohen
>            Assignee: Doron Cohen
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: lucene-1302-explain-negative.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org