Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4ECD9A49 for ; Tue, 13 Mar 2012 13:24:38 +0000 (UTC) Received: (qmail 17523 invoked by uid 500); 13 Mar 2012 13:24:37 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 17478 invoked by uid 500); 13 Mar 2012 13:24:37 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 17470 invoked by uid 99); 13 Mar 2012 13:24:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 13:24:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ey0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 13:24:30 +0000 Received: by eaai1 with SMTP id i1so183371eaa.35 for ; Tue, 13 Mar 2012 06:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=FR8xkUyhavMO7CYSu88Q08YAq1dGnqPJv5dzMJ92gbQ=; b=M1pEtFwL0tyP3sV3Nue4w/VIWX8e8WY4+/zyOBBvjtJmAhT+AtJkQX1KUow6Uq0W7k Nk3gFZx4kYXM4xAoh4akymSP03GdvX3H9aQYA+AkwE/NTIUf1JXIeSMAogb6fiNJSg2x LeLdWFCLmcTVZEWBVRZdmSzVlctEXY7x88k5+8RGcAtRlTmZCBuD2eaFqXpFIeCgzFHj A6fHCfZ9jk3Wt1v9orPKaMRqH3dfiwxpqsbzmwRHzGEa6LREsrEHtLRQb1B0xZFTj/VP YtJav6gXsPtwtJ0PcBbp/43WE8EMd5I3h39XA4ih8nrsVMBnzeLybKKRqvqGuU+25DNB F2jg== MIME-Version: 1.0 Received: by 10.50.180.168 with SMTP id dp8mr4606955igc.57.1331645050251; Tue, 13 Mar 2012 06:24:10 -0700 (PDT) Received: by 10.43.46.137 with HTTP; Tue, 13 Mar 2012 06:24:10 -0700 (PDT) In-Reply-To: <788445007.6929.1331615866789.JavaMail.tomcat@hel.zones.apache.org> References: <788445007.6929.1331615866789.JavaMail.tomcat@hel.zones.apache.org> Date: Tue, 13 Mar 2012 08:24:10 -0500 Message-ID: Subject: Re: [jira] [Commented] (SOLR-2155) Geospatial search using geohash prefixes From: Erick Erickson To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Be brave, just go for building it ... It's actually surprisingly easy. Start here: http://wiki.apache.org/solr/HowToContribute you should be able to get this all running (assuming you have svn, ant and a jdk) in about 15 minutes, exclusive of the checkout time. I was amazed first time I tried it. One note: Solr 3.x all go against the 1.5 JDK. It should work against the 1.6, but note that the release was compiled with 1.5..... Applying the patches is patching source code and recompiling Best Erick On Tue, Mar 13, 2012 at 12:17 AM, Harley Parks (Commented) (JIRA) wrote: > > =A0 =A0[ https://issues.apache.org/jira/browse/SOLR-2155?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 13228218#comment-13228218 ] > > Harley Parks commented on SOLR-2155: > ------------------------------------ > > So, basic question.. perhaps needs to be posted else where. > I'm working with Solr 3.4, using the GeoHash to store multiple locations = for a document. > if geofilt or geodist doesn't work with the GeoHash, is the only way to a= dd this patch into solr 3.4? > I'm using a tomcat and solr, and jumping to 4.0 might be a while, even if= it's released soon. > > I'm not real clear how to apply the patch, as I would need basically crea= te the solr.war file from the source... and compile all of the other source= s... painful, but once setup, perhaps rewarding. > > Ideally, I would have a jar file from the patch, that I drop into the sol= r/lib and make the needed changes to the config files. > > So, I'm real interested in getting something stable, so i'm watching the = above mentioned links. > > David Smiley, would you be able to amend your book - Apache Solr 3 ESS, w= hich mentions solr-2155, to include how to implement this patch? or do I ne= ed to get brave, and build the source? > >> Geospatial search using geohash prefixes >> ---------------------------------------- >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Key: SOLR-2155 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 URL: https://issues.apache.org/jira/brow= se/SOLR-2155 >> =A0 =A0 =A0 =A0 =A0 =A0 Project: Solr >> =A0 =A0 =A0 =A0 =A0Issue Type: Improvement >> =A0 =A0 =A0 =A0 =A0 =A0Reporter: David Smiley >> =A0 =A0 =A0 =A0 Attachments: GeoHashPrefixFilter.patch, GeoHashPrefixFil= ter.patch, GeoHashPrefixFilter.patch, SOLR-2155_GeoHashPrefixFilter_with_so= rting_no_poly.patch, SOLR.2155.p3.patch, SOLR.2155.p3tests.patch, Solr2155-= 1.0.2-project.zip, Solr2155-1.0.3-project.zip, Solr2155-for-1.0.2-3.x-port.= patch >> >> >> There currently isn't a solution in Solr for doing geospatial filtering = on documents that have a variable number of points. =A0This scenario occurs= when there is location extraction (i.e. via a "gazateer") occurring on fre= e text. =A0None, one, or many geospatial locations might be extracted from = any given document and users want to limit their search results to those oc= curring in a user-specified area. >> I've implemented this by furthering the GeoHash based work in Lucene/Sol= r with a geohash prefix based filter. =A0A geohash refers to a lat-lon box = on the earth. =A0Each successive character added further subdivides the box= into a 4x8 (or 8x4 depending on the even/odd length of the geohash) grid. = =A0The first step in this scheme is figuring out which geohash grid squares= cover the user's search query. =A0I've added various extra methods to GeoH= ashUtils (and added tests) to assist in this purpose. =A0The next step is a= n actual Lucene Filter, GeoHashPrefixFilter, that uses these geohash prefix= es in TermsEnum.seek() to skip to relevant grid squares in the index. =A0On= ce a matching geohash grid is found, the points therein are compared agains= t the user's query to see if it matches. =A0I created an abstraction GeoSha= pe extended by subclasses named PointDistance... and CartesianBox.... to su= pport different queried shapes so that the filter need not care about these= details. >> This work was presented at LuceneRevolution in Boston on October 8th. > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA administra= tors: https://issues.apache.org/jira/secure/ContactAdministrators!default.j= spa > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org