lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-991) BoostingTermQuery.explain() bugs
Date Sat, 08 Sep 2007 16:59:29 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Grant Ingersoll resolved LUCENE-991.
------------------------------------

       Resolution: Fixed
    Lucene Fields: [Patch Available]  (was: [Patch Available, New])

Committed.

> BoostingTermQuery.explain() bugs
> --------------------------------
>
>                 Key: LUCENE-991
>                 URL: https://issues.apache.org/jira/browse/LUCENE-991
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.2
>            Reporter: Peter Keegan
>            Assignee: Grant Ingersoll
>            Priority: Minor
>         Attachments: TestBoostingTermQuery.patch, TestBoostingTermQuery2.patch, TestBoostingTermQuery3.patch,
TestBoostingTermQuery4.patch
>
>
> There are a couple of minor bugs in BoostingTermQuery.explain().
> 1. The computation of average payload score produces NaN if no payloads were found. It
should probably be:
> float avgPayloadScore = super.score() * (payloadsSeen > 0 ? (payloadScore / payloadsSeen)
: 1);
> 2. If the average payload score is zero, the value of the explanation is 0:
> result.setValue(nonPayloadExpl.getValue() * avgPayloadScore);
> If the query is part of a BooleanClause, this results in:
> "no match on required clause..."
> "failure to meet condition(s) of required/prohibited clause(s)"
> The average payload score can be zero if the field boost = 0.
> I've attached a patch to 'TestBoostingTermQuery.java', however, the test 'testNoPayload'
fails in 'SpanScorer.score()' because the doc = -1. It looks like 'setFreqCurrentDoc() should
have been called before 'score()'. Maybe someone more knowledgable of spans could investigate
this.

-- 
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