Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 13553 invoked from network); 10 Jun 2008 16:41:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 16:41:08 -0000 Received: (qmail 69385 invoked by uid 500); 10 Jun 2008 16:41:08 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 69341 invoked by uid 500); 10 Jun 2008 16:41:08 -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 69332 invoked by uid 99); 10 Jun 2008 16:41:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 09:41:08 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 16:40:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 11A8F234C137 for ; Tue, 10 Jun 2008 09:40:45 -0700 (PDT) Message-ID: <1097007877.1213116045071.JavaMail.jira@brutus> Date: Tue, 10 Jun 2008 09:40:45 -0700 (PDT) From: "Hoss Man (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1302) explain should not mask negative scores In-Reply-To: <1691282330.1213103445398.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-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603925#action_12603925 ] 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: 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