Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 70523 invoked from network); 1 Feb 2006 12:24:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Feb 2006 12:24:48 -0000 Received: (qmail 79893 invoked by uid 500); 1 Feb 2006 12:24:41 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 79865 invoked by uid 500); 1 Feb 2006 12:24:41 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 79854 invoked by uid 99); 1 Feb 2006 12:24:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 04:24:41 -0800 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.138.151.43] (HELO inergen.sybase.com) (192.138.151.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 04:24:40 -0800 Received: from smtp2.sybase.com (sybgate2 [10.22.97.85]) by inergen.sybase.com with ESMTP id k11COJt29972 for ; Wed, 1 Feb 2006 04:24:19 -0800 (PST) Received: from gwwest.sybase.com (localhost [127.0.0.1]) by smtp2.sybase.com with ESMTP id EAA04957 for ; Wed, 1 Feb 2006 04:24:19 -0800 (PST) Subject: Sorting by Score To: java-user@lucene.apache.org X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: Daniel.Clark@sybase.com Date: Wed, 1 Feb 2006 07:24:17 -0500 X-MIMETrack: Serialize by Router on gwwest/SYBASE(Release 6.5.4|March 27, 2005) at 02/01/2006 04:24:19 AM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N My primary sort is by relevance score and my secondary sort is by date. The Hits.getScore() method returns the score by 7 digits to the right of the decimal point. Therefore, If I round to only 2 decimal points in the display, the underlying 7 point score will be different in the sort. Example: score = .7876546 Display score = 79% The two scores should be equal in sort. score = .7907536 Display score = 79% How do I convert the score in the Hits.getScore() method to sort to the rounded 2 decimal point float like the score displayed? Any help will be appreciated. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Daniel Clark, Senior Consultant Sybase Federal Professional Services 6550 Rock Spring Drive, Suite 800 Bethesda, MD 20817 Office - (301) 896-1103 Office Fax - (301) 896-1604 Mobile - (703) 403-0340 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org