lucene-dev mailing list archives

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


Hoss Man commented on LUCENE-1302:

bq. The one thing that bothers me still is that the BTQ sub-expl would print as MATCH when
in fact it just hurts the current doc score (apparently "not enough"). Would it be more correct
for the (negative) BTQ part to say "NON-MATCH"?

Bottom Line: if "next()" stops on a doc, then the Explanation for that doc should indicate
a "MATCH" ... regardless of what the score is.

the the Explanation by BTQ indicates it's a "NON-MACH" even thought the BTQ Scorer would return
it as a "hit" when searching, that would screw up the Explanation generated by a BooleanQuery.
 Consider a 3 clause BooleanQuery with minNrShouldMath set to 2.  one of the clauses only
matches doc#42, one of the clauses matches no docs, and the third clause is a BTQ -- if the
Explanation for the BTQ says NO_MATCH for doc#42 just because it has a negative score then
the BooleanQuery Explanation is going to say the wrong thing.

> explain should not mask negative scores
> ---------------------------------------
>                 Key: LUCENE-1302
>                 URL:
>             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:
For additional commands, e-mail:

View raw message