Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 57104 invoked from network); 21 Aug 2009 13:08:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Aug 2009 13:08:18 -0000 Received: (qmail 92698 invoked by uid 500); 21 Aug 2009 13:08:39 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 92632 invoked by uid 500); 21 Aug 2009 13:08:39 -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 92562 invoked by uid 99); 21 Aug 2009 13:08:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 13:08:39 +0000 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, 21 Aug 2009 13:08:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 16895234C1EF for ; Fri, 21 Aug 2009 06:08:15 -0700 (PDT) Message-ID: <175418150.1250860095091.JavaMail.jira@brutus> Date: Fri, 21 Aug 2009 06:08:15 -0700 (PDT) From: "Mark Miller (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1087) MultiSearcher.explain returns incorrect score/explanation relating to docFreq In-Reply-To: <24876052.1197312943229.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Miller updated LUCENE-1087: -------------------------------- Fix Version/s: 2.9 Assignee: Mark Miller > MultiSearcher.explain returns incorrect score/explanation relating to docFreq > ----------------------------------------------------------------------------- > > Key: LUCENE-1087 > URL: https://issues.apache.org/jira/browse/LUCENE-1087 > Project: Lucene - Java > Issue Type: Bug > Components: Query/Scoring > Affects Versions: 2.2 > Environment: No special hardware required to reproduce the issue. > Reporter: Yasoja Seneviratne > Assignee: Mark Miller > Priority: Minor > Fix For: 2.9 > > > Creating 2 different indexes, searching each individually and print score details and compare to searching both indexes with MulitSearcher and printing score details. > > The "docFreq" value printed isn't correct - the values it prints are as if each index was searched individually. > Code is like: > {code} > MultiSearcher multi = new MultiSearcher(searchables); > Hits hits = multi.search(query); > for(int i=0; i { > Explanation expl = multi.explain(query, hits.id(i)); > System.out.println(expl.toString()); > } > {code} > I raised this in the Lucene user mailing list and was advised to log a bug, email thread given below. > {noformat} > -----Original Message----- > From: Chris Hostetter > Sent: Friday, December 07, 2007 10:30 PM > To: java-user > Subject: Re: does the MultiSearcher class calculate IDF properly? > a quick glance at the code seems to indicate that MultiSearcher has code > for calcuating the docFreq accross all of the Searchables when searching > (or when the docFreq method is explicitly called) but that explain method > just delegates to Searchable that the specific docid came from. > if you compare that Explanation score you got with the score returned by > a HitCollector (or TopDocs) they probably won't match. > So i would say "yes MultiSearcher calculates IDF properly, but > MultiSeracher.explain is broken. Please file a bug about this, i can't > think of an easy way to fix it, but it certianly seems broken to me. > : Subject: does the MultiSearcher class calculate IDF properly? > : > : I tried the following. Creating 2 different indexes, search each > : individually and print score details and compare to searching both > : indexes with MulitSearcher and printing score details. > : > : The "docFreq" value printed don't seem right - is this just a problem > : with using Explain together with the MultiSearcher? > : > : > : Code is like: > : MultiSearcher multi = new MultiSearcher(searchables); > : Hits hits = multi.search(query); > : for(int i=0; i : { > : Explanation expl = multi.explain(query, hits.id(i)); > : System.out.println(expl.toString()); > : } > : > : > : Output: > : id = 14 score = 0.071 > : 0.07073946 = (MATCH) fieldWeight(contents:climate in 2), product of: > : 1.0 = tf(termFreq(contents:climate)=1) > : 1.8109303 = idf(docFreq=1) > : 0.0390625 = fieldNorm(field=contents, doc=2) > {noformat} -- 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