Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 2276 invoked from network); 18 Sep 2005 14:24:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2005 14:24:49 -0000 Received: (qmail 81134 invoked by uid 500); 18 Sep 2005 14:24:44 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 81107 invoked by uid 500); 18 Sep 2005 14:24:44 -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 81094 invoked by uid 99); 18 Sep 2005 14:24:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 07:24:44 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.38.237] (HELO web51806.mail.yahoo.com) (206.190.38.237) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 18 Sep 2005 07:24:52 -0700 Received: (qmail 28569 invoked by uid 60001); 18 Sep 2005 14:24:39 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Kymxida2ac8xaEOhOHd6jHdnfrdN4AMNVFW5t5VixVYW7gIe7yDhgO7yUh3kpR6fP2ujxNBUSDFOYPDQgAURWhKb0pXKot469iXGXDDxefNybqBfdj6XIRDwGtz4BI2stezaODs3SJC61dhBcCeRxjzdJhcdjC03kA8DaxLaIm4= ; Message-ID: <20050918142439.28567.qmail@web51806.mail.yahoo.com> Received: from [66.127.61.92] by web51806.mail.yahoo.com via HTTP; Sun, 18 Sep 2005 07:24:39 PDT Date: Sun, 18 Sep 2005 07:24:39 -0700 (PDT) From: James Huang Subject: Re: Sort by relevance+distance To: java-user@lucene.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- Erik Hatcher wrote: > Get back to using your DistanceComparatorSource, and > couple that with > a SortField.FIELD_SCORE, like this: > > Sort sort = new Sort(new SortField[] {new > SortField("location", > new DistanceComparatorSource( you need>)), > SortField.FIELD_SCORE}); Thanks! Does the order of thest two fields matter? I mean, with your code, would distance take precedence over relevance? Anyway, I'll try it out and play with ordering and such. -James > > Erik > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org