Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 4382 invoked from network); 5 Nov 2006 06:15:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2006 06:15:41 -0000 Received: (qmail 26435 invoked by uid 500); 5 Nov 2006 06:15:51 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 26381 invoked by uid 500); 5 Nov 2006 06:15:50 -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 26369 invoked by uid 99); 5 Nov 2006 06:15:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2006 22:15:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Sat, 04 Nov 2006 22:15:38 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4F66B7142BF for ; Sat, 4 Nov 2006 22:15:18 -0800 (PST) Message-ID: <16059589.1162707318322.JavaMail.root@brutus> Date: Sat, 4 Nov 2006 22:15:18 -0800 (PST) From: "Doron Cohen (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-697) Scorer.skipTo affects sloppyPhrase scoring In-Reply-To: <26397508.1161748396540.JavaMail.root@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 [ http://issues.apache.org/jira/browse/LUCENE-697?page=comments#action_12447234 ] Doron Cohen commented on LUCENE-697: ------------------------------------ You're right Yonik, pp1.offset < pp2.offset is equivalent. However note that pp1.position + pp1.offset == tp1.position, i.e. by adding the (query) offset we compare the termPosition offsets, as read from the index. Just to complete the setting - having pp.position == tp.position - offset allows the phrase scorer to identify a match when all pp.positions are the same (for exact) or distant no more than slope (for sloppy). So we should probably return the simpler expression as you suggest, and comment the code, something like this: if (pp1.doc == pp2.doc) if (pp1.position == pp2.position) // Same doc and pp.positions, so compare *actual term positions*. // Since pp.position == tp.position - (query) offset, // can restore tp.position as pp.position + offset. // But pp.positions are equal, so can just compare the offsets. return pp1.offset < pp2.offset; else return pp1.position < pp2.position; else return pp1.doc < pp2.doc; makes sense? Perhaps it would be nice if we also add some code comments to the scorers...? > Scorer.skipTo affects sloppyPhrase scoring > ------------------------------------------ > > Key: LUCENE-697 > URL: http://issues.apache.org/jira/browse/LUCENE-697 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 2.0.0 > Reporter: Yonik Seeley > Assigned To: Doron Cohen > Attachments: sloppy_phrase_skipTo.patch, sloppy_phrase_skipTo.patch2 > > > If you mix skipTo() and next(), you get different scores than what is returned to a hit collector. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org