From java-user-return-17192-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Fri Oct 28 23:54:27 2005 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 26511 invoked from network); 28 Oct 2005 23:54:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Oct 2005 23:54:26 -0000 Received: (qmail 11545 invoked by uid 500); 28 Oct 2005 23:54:24 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 10680 invoked by uid 500); 28 Oct 2005 23:54:21 -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 10669 invoked by uid 99); 28 Oct 2005 23:54:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2005 16:54:21 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2005 16:54:16 -0700 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id 9D82C5B82D; Fri, 28 Oct 2005 16:53:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id 95C027F476 for ; Fri, 28 Oct 2005 16:53:55 -0700 (PDT) Date: Fri, 28 Oct 2005 16:53:55 -0700 (PDT) From: Chris Hostetter Sender: hossman@hal.rescomp.berkeley.edu To: java-user@lucene.apache.org Subject: Re: geographical search In-Reply-To: <4361F094.6070709@citycita.net> Message-ID: References: <4361F094.6070709@citycita.net> 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 : put some text. Then i did some range queries like this : : queryString=foo AND country:United States AND : coordinates@lon:[-74.04047986086957 TO -73.95352333913044] AND : coordinates@lat:[40.70662093913044 TO 40.793577460869564] : It worked well with positive coordinates in Europe, not in the US so i : planned to put N/S before latitude, E/O before longitudes to replace : negative values. : But something tells me this is not the way to do things with Lucene and : not use the range query:-) There's nothing inheriently wrong with your appraoch .. but a RangeFilter will have less performance problems then a RangeQuery as the size of your data set gets larger. : - http://wiki.apache.org/nutch/GeoPosition : - and this from the Boss :-) : http://www.opensubscriber.com/message/lucene-dev@jakarta.apache.org/184558.html I've never looked at these URLs before, but hte basic gist of the Nutch code seems to be that at index time, it's translating the lat/lon coords into x/y/z coords to simplify the range claculations -- ie: the math to find the upper/lower bounds of x/y/z at search time when when you want a distance of 100km then it is to find the the upper/lower bounds on lat/lon. if you're happy to have your users input ranges of lat/lon then you don't really need to worry about it. The previous thread seemed to mainly be about designing a new special query type to specifically deal with Geographic based queries ... nad by the looks of it to score results by distance ... Doug's comment about the FieldCache is applicable if you were trying to do that, but if you simply want a way to restrict results to a particular grid of lat/lon, your current appraoch should be fine. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org