Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 36126 invoked from network); 22 Feb 2008 10:35:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2008 10:35:03 -0000 Received: (qmail 64141 invoked by uid 500); 22 Feb 2008 10:34:56 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 64097 invoked by uid 500); 22 Feb 2008 10:34:56 -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 64086 invoked by uid 99); 22 Feb 2008 10:34:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 02:34:56 -0800 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; Fri, 22 Feb 2008 10:34:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 58CC0234C043 for ; Fri, 22 Feb 2008 02:34:19 -0800 (PST) Message-ID: <1165710162.1203676459362.JavaMail.jira@brutus> Date: Fri, 22 Feb 2008 02:34:19 -0800 (PST) From: =?utf-8?Q?Christian_Kohlsch=C3=BCtter_=28JIRA=29?= To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-954) Toggle score normalization in Hits In-Reply-To: <18510181.1183999984502.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-954?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1257= 1339#action_12571339 ]=20 Christian Kohlsch=C3=BCtter commented on LUCENE-954: ----------------------------------------------- You are right, Yonik. Hits currently tries to "hide" this by normalizing the scores to a maximum = of 1, simply by dividing the "raw" scores by the maximum score returned. This is why the scores from Hits are currently not comparable to each other= . The suggested patch resolves this problem. > Toggle score normalization in Hits > ---------------------------------- > > Key: LUCENE-954 > URL: https://issues.apache.org/jira/browse/LUCENE-954 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 2.2 > Environment: any > Reporter: Christian Kohlsch=C3=BCtter > Attachments: hits-scoreNorm.patch > > > The current implementation of the "Hits" class sometimes performs score n= ormalization. > In particular, whenever the top-ranked score is bigger than 1.0, it is no= rmalized to a maximum of 1.0. > In this case, Hits may return different score results than TopDocs-based = methods. > In my scenario (a federated search system), Hits delievered just plain wr= ong results. > I was merging results from several sources, all having homogeneous statis= tics (similar to MultiSearcher, but over the Internet using HTTP/XML-based = protocols). > Sometimes, some of the sources had a top-score greater than 1, so I ended= up with garbled results. > I suggest to add a switch to enable/disable this score-normalization at r= untime. > My patch (attached) has an additional peformance benefit, since score nor= malization now occurs only when Hits#score() is called, not when creating t= he Hits result list. Whenever scores are not required, you save one multipl= ication per retrieved hit (i.e., at least 100 multiplications with the curr= ent implementation of Hits). --=20 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