Re: Geospatial queries in Solr

2011-07-22 Thread Jamie Johnson
Thanks David. I'm going to continue to play with this, as an FYI you were spot on, changing to use a geohash field worked with the previous test. Again I appreciate all of the information, and awesome work. On Fri, Jul 22, 2011 at 10:05 AM, Smiley, David W. wrote: > Wrapping the dateline or be

Re: Geospatial queries in Solr

2011-07-22 Thread Smiley, David W.
Wrapping the dateline or being able to encircle one of the poles (but not necessarily both) are polygon query features that I feel need to be addressed before this module is first released (whenever that is), definitely. And arguably before benchmarking, which we're looking to focus on soon. S

Re: Geospatial queries in Solr

2011-07-22 Thread Jamie Johnson
Ah, my mistake then. I will switch to using the geohash field. When doing my query I did run it against geohash but when I got Russia that was more incorrect than point so I stopped using it. Is there a timeline by which you expect the dateline issue to be addressed? I don't believe that will b

Re: Geospatial queries in Solr

2011-07-22 Thread David Smiley (@MITRE.org)
Jamie, You are using the field named "point" which is based on PointFieldType. Keep in mind that just because this field type is named this way, does *not* mean at all that other fields don't hold points, or that this one is especially suited to it. Arguably this one is named poorly. This fiel

Re: Geospatial queries in Solr

2011-07-21 Thread Jamie Johnson
Yes this is just running the sample. The query is as follows http://localhost:8080/solr/select?debugQuery=true&q=point%3A%22IsWithin%28POLYGON%28%28-74.527709960938+40.350830078125%2C-74.4892578125+39.730102539062%2C-75.263793945313+39.653198242187%2C-74.527709960938+40.350830078125%29%29%29%22&r

Re: Geospatial queries in Solr

2011-07-21 Thread Smiley, David W.
Is this happening reproducibly from the demo app? Please try and reproduce it there; if you can't then the problem is somewhere in your setup, I figure. If you can reproduce it in the demo then please send me a direct email with the polygon shape, and your expectation of a particular point that

Re: Geospatial queries in Solr

2011-07-21 Thread Jamie Johnson
I think I've missed something. From what I'm seeing it appears that a bounding box is being built from my polygon and any points in that bounding box are returned. This makes sense from the debug which says the query is +(+point__x:[-75.267333984375 TO -74.569702148438] +point__y:[39.512329101563

Re: Geospatial queries in Solr

2011-07-21 Thread Jamie Johnson
Thanks for the reply. My setup has a point in the field and a shape as the query. Given this it sounds as if I can get more precise results by changing the distErrPct on a query parameter. I'll give this a whirl. Again thank you. On Thu, Jul 21, 2011 at 11:13 AM, Smiley, David W. wrote: > If

Re: Geospatial queries in Solr

2011-07-21 Thread Smiley, David W.
If you are talking about indexed shapes, then there is an attribute on the field type definition in your schema called "distErrPct". Reasonable values are between .01 and .20, in my opinion. The default is .025, but try setting it to .01. For points, use the "maxDetailKm" parameter, which is

Re: Geospatial queries in Solr

2011-07-20 Thread Jamie Johnson
Thanks David. When trying to execute queries on a complex irregular polygon (say the shape of NJ) I'm getting results which are actually outside of that polygon. Is there a setting which controls this resolution? On Wed, Jul 20, 2011 at 2:53 PM, Smiley, David W. wrote: > The notion of a "system

Re: Geospatial queries in Solr

2011-07-20 Thread Smiley, David W.
The notion of a "system property" is a java concept; google it and you'll learn more. BTW, despite my responsiveness in helping right now; I'm pretty busy this week so this won't necessarily last long. ~ David On Jul 20, 2011, at 2:43 PM, Jamie Johnson wrote: > Where do you set that? > > On W

Re: Geospatial queries in Solr

2011-07-20 Thread Jamie Johnson
Where do you set that? On Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. wrote: > You can set the system property SpatialContextProvider to > com.googlecode.lucene.spatial.base.context.JtsSpatialContext > > ~ David > > On Jul 20, 2011, at 2:02 PM, Jamie Johnson wrote: > >> So I've pulled the lat

Re: Geospatial queries in Solr

2011-07-20 Thread Smiley, David W.
You can set the system property SpatialContextProvider to com.googlecode.lucene.spatial.base.context.JtsSpatialContext ~ David On Jul 20, 2011, at 2:02 PM, Jamie Johnson wrote: > So I've pulled the latest and can run the example, I've tried to move > my config over and am having a bit of an iss

Re: Geospatial queries in Solr

2011-07-20 Thread Jamie Johnson
So I've pulled the latest and can run the example, I've tried to move my config over and am having a bit of an issue when executing queries, specifically I get this: Unable to read: POLYGON((... looking at the code it's usign the simple spatial context, how do I specify JtsSpatialContext? On Wed

Re: Geospatial queries in Solr

2011-07-20 Thread Jamie Johnson
Thanks for the update David, I'll give that a try now. On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. wrote: > Ryan just updated LSP for Lucene/Solr trunk compatibility so you should do a > "mvn clean install" and you'll be back in business. > > On Jul 20, 2011, at 10:37 AM, Jamie Johnson wr

Re: Geospatial queries in Solr

2011-07-20 Thread Smiley, David W.
Ryan just updated LSP for Lucene/Solr trunk compatibility so you should do a "mvn clean install" and you'll be back in business. On Jul 20, 2011, at 10:37 AM, Jamie Johnson wrote: > Thanks for responding so quickly, I don't mind waiting a bit. I'll > hang out until the updates have been made.

Re: Geospatial queries in Solr

2011-07-20 Thread Jamie Johnson
Thanks for responding so quickly, I don't mind waiting a bit. I'll hang out until the updates have been made. Thanks again. On Tue, Jul 19, 2011 at 3:51 PM, Smiley, David W. wrote: > Hi Jamie. > I work on LSP; it can index polygons and query for them. Although the > capability is there, we ha

Re: Geospatial queries in Solr

2011-07-19 Thread Smiley, David W.
Hi Jamie. I work on LSP; it can index polygons and query for them. Although the capability is there, we have more testing & benchmarking to do, and then we need to put together a tutorial to explain how to use it at the Solr layer. I recently cleaned up the READMEs a bit. Try downloading the t