Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 39050 invoked from network); 9 Nov 2005 22:08:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Nov 2005 22:08:31 -0000 Received: (qmail 85109 invoked by uid 500); 9 Nov 2005 22:08:24 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 85079 invoked by uid 500); 9 Nov 2005 22:08:24 -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 85068 invoked by uid 99); 9 Nov 2005 22:08:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2005 14:08:24 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 25CF822B for ; Wed, 9 Nov 2005 23:08:03 +0100 (CET) Message-ID: <605928587.1131574083122.JavaMail.jira@ajax.apache.org> Date: Wed, 9 Nov 2005 23:08:03 +0100 (CET) From: "Yonik Seeley (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-462) bad normalization in sorted search returning TopDocs In-Reply-To: <1787729660.1131569282861.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-462?page=all ] Yonik Seeley updated LUCENE-462: -------------------------------- Attachment: FieldSortedHitQueue_maxscore.patch Proposed patch attached: - insert(FieldDoc) keeps track of maxscore and calls super.insert(Object) - the maximum score is now kept track of, even if it is less than 1.0 - getMaxScore() added This should also be slightly faster than the old way since there are only "n" comparisons against maxscore. Previously, two comparisons would be done for every call to lessThan() (2*nlog(n) maybe?) > bad normalization in sorted search returning TopDocs > ---------------------------------------------------- > > Key: LUCENE-462 > URL: http://issues.apache.org/jira/browse/LUCENE-462 > Project: Lucene - Java > Type: Bug > Reporter: Yonik Seeley > Assignee: Yonik Seeley > Priority: Minor > Attachments: FieldSortedHitQueue_maxscore.patch > > FieldSortedHitQueue.maxscore is maintained in the lessThan method (which never gets called if a single document is added to the queue). > I've checked in a test to TestSort.testTopDocsScores() with the final assertion commented out. -- 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