lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1302) explain should not mask negative scores
Date Tue, 10 Jun 2008 15:26:45 GMT

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

Hoss Man commented on LUCENE-1302:
----------------------------------

Doron: i haven't looked at your patch, but Explanation.isMatch returns false for negative
scores to be backwards compatible (see LUCENE-605).  Any non-trivial query types where a match
can get a non-positive score should be using a ComplexExplanation.

these comments don't make sense to me...

bq. Another option is for BTQ to return a ComplexExplanation instead of Explanation and setMatch(true)
if the score is non-zero.

...BTQ should call setMatch(true) if it's a "match" (ie: if the doc would be passed to a HItCollectors
collect method) not conditionally based on the score.

bq. Still it would disturb to declare a "negative score" as a "match".

... no idea what you ment there.


> 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


Mime
View raw message