Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 57561 invoked from network); 7 Sep 2007 11:19:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Sep 2007 11:19:57 -0000 Received: (qmail 88024 invoked by uid 500); 7 Sep 2007 11:19:49 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 87978 invoked by uid 500); 7 Sep 2007 11:19:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 87962 invoked by uid 99); 7 Sep 2007 11:19:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2007 04:19:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2007 11:21:15 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 15D7F714163 for ; Fri, 7 Sep 2007 04:19:31 -0700 (PDT) Message-ID: <15897649.1189163971086.JavaMail.jira@brutus> Date: Fri, 7 Sep 2007 04:19:31 -0700 (PDT) From: "Grant Ingersoll (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Assigned: (LUCENE-991) BoostingTermQuery.explain() bugs In-Reply-To: <2402000.1188570991005.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grant Ingersoll reassigned LUCENE-991: -------------------------------------- Assignee: Grant Ingersoll > 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 > > > 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