You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jamie Johnson <je...@gmail.com> on 2011/07/19 21:03:21 UTC

Geospatial queries in Solr

I have looked at the code being shared on the
lucene-spatial-playground and was wondering if anyone could provide
some details as to its state.  Specifically I'm looking to add
geospatial support to my application based on a user provided polygon,
is this currently possible using this extension?

Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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. <ds...@mitre.org> wrote:
> 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.  So "Soon".  W/i 2 months?  Just a guess.
>
> ~ David
>
> On Jul 22, 2011, at 8:18 AM, Jamie Johnson wrote:
>
>> 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 be an issue for me since I don't
>> believe we have any information which will be from that area of the
>> world but I'll have to verify.
>>
>>
>> On Fri, Jul 22, 2011 at 3:35 AM, David Smiley (@MITRE.org)
>> <DS...@mitre.org> wrote:
>>> 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 field
>>> type is loosely based on Solr's LatLonType but it doesn't yet fully
>>> implement capabilities like crossing the dateline and shapes other than a
>>> bounding box.  I've enhanced the code to log a warning if the query shape is
>>> expanded to the bounding box. Any way, it's a currently a 2nd class citizen
>>> in LSP.
>>>  I recommend you use the field named "geohash" which uses a field type name
>>> starting with "Recursive...".  Note that the same query you did with this
>>> field returned the polygon of Russia.  There is an outstanding box in which
>>> we don't properly handle polygons crossing the dateline; other shapes are
>>> fine.
>>>
>>> ~ David
>>>
>>> -----
>>>  Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
>>> --
>>> View this message in context: http://lucene.472066.n3.nabble.com/Geospatial-queries-in-Solr-tp3183374p3190762.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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.  So "Soon".  W/i 2 months?  Just a guess.

~ David
 
On Jul 22, 2011, at 8:18 AM, Jamie Johnson wrote:

> 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 be an issue for me since I don't
> believe we have any information which will be from that area of the
> world but I'll have to verify.
> 
> 
> On Fri, Jul 22, 2011 at 3:35 AM, David Smiley (@MITRE.org)
> <DS...@mitre.org> wrote:
>> 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 field
>> type is loosely based on Solr's LatLonType but it doesn't yet fully
>> implement capabilities like crossing the dateline and shapes other than a
>> bounding box.  I've enhanced the code to log a warning if the query shape is
>> expanded to the bounding box. Any way, it's a currently a 2nd class citizen
>> in LSP.
>>  I recommend you use the field named "geohash" which uses a field type name
>> starting with "Recursive...".  Note that the same query you did with this
>> field returned the polygon of Russia.  There is an outstanding box in which
>> we don't properly handle polygons crossing the dateline; other shapes are
>> fine.
>> 
>> ~ David
>> 
>> -----
>>  Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
>> --
>> View this message in context: http://lucene.472066.n3.nabble.com/Geospatial-queries-in-Solr-tp3183374p3190762.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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 be an issue for me since I don't
believe we have any information which will be from that area of the
world but I'll have to verify.


On Fri, Jul 22, 2011 at 3:35 AM, David Smiley (@MITRE.org)
<DS...@mitre.org> wrote:
> 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 field
> type is loosely based on Solr's LatLonType but it doesn't yet fully
> implement capabilities like crossing the dateline and shapes other than a
> bounding box.  I've enhanced the code to log a warning if the query shape is
> expanded to the bounding box. Any way, it's a currently a 2nd class citizen
> in LSP.
>  I recommend you use the field named "geohash" which uses a field type name
> starting with "Recursive...".  Note that the same query you did with this
> field returned the polygon of Russia.  There is an outstanding box in which
> we don't properly handle polygons crossing the dateline; other shapes are
> fine.
>
> ~ David
>
> -----
>  Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Geospatial-queries-in-Solr-tp3183374p3190762.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Geospatial queries in Solr

Posted by "David Smiley (@MITRE.org)" <DS...@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 field
type is loosely based on Solr's LatLonType but it doesn't yet fully
implement capabilities like crossing the dateline and shapes other than a
bounding box.  I've enhanced the code to log a warning if the query shape is
expanded to the bounding box. Any way, it's a currently a 2nd class citizen
in LSP.
  I recommend you use the field named "geohash" which uses a field type name
starting with "Recursive...".  Note that the same query you did with this
field returned the polygon of Russia.  There is an outstanding box in which
we don't properly handle polygons crossing the dateline; other shapes are
fine.

~ David

-----
 Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
--
View this message in context: http://lucene.472066.n3.nabble.com/Geospatial-queries-in-Solr-tp3183374p3190762.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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&rows=10&fl=id%2Cname%2Csource%2Cscore

which returns Philadelphia which is outside of my polygon, but inside
the bounding box which contains my polygon.

On Thu, Jul 21, 2011 at 1:05 PM, Smiley, David W. <ds...@mitre.org> wrote:
> 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 should fit.
>
> ~ David
>
> On Jul 21, 2011, at 12:40 PM, Jamie Johnson wrote:
>
>> 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 TO 40.523071289063])
>> +DistanceValueSource(org.apache.lucene.spatial.base.distance.EuclidianDistanceCalculator@c7d9406)
>>
>> Given that does point support doing what I am trying to do or should I
>> be using another field type?
>>
>> I understand that you're busy so no rush on this.
>>
>> On Thu, Jul 21, 2011 at 11:48 AM, Jamie Johnson <je...@gmail.com> wrote:
>>> 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. <ds...@mitre.org> wrote:
>>>> 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 the kilometer detail level.  By default, that parameter is .001 -- 1 meter.
>>>>
>>>> If you are talking about your query shape, then this same parameter can be supplied as a request parameter.  Again, the default is .025. The RecursiveGridFieldType can handle infinite query side precision, so you can supply 0 and still get reasonable performance. However if your indexing side is a certain precision, then there's little point in using more precision on the query side since in-effect it's as accurate as your index side.
>>>>
>>>> If you're wondering more about the meaning of distErrPct, see this snippet from SpatialArgs.java:
>>>>  /**
>>>>   * The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable
>>>>   * error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes
>>>>   * the shape to a square given it's bounding box area:
>>>>   * <pre>sqrt(shape.bbox.area)/2</pre>
>>>>   * And the error distance is beyond the shape such that the shape is a minimum shape.
>>>>   */
>>>>  public Double getDistPrecision() {
>>>>
>>>> ~ David
>>>>
>>>> On Jul 20, 2011, at 5:44 PM, Jamie Johnson wrote:
>>>>
>>>>> 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. <ds...@mitre.org> wrote:
>>>>>> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>>>>>> Thanks for the update David, I'll give that a try now.
>>>>>>>>>>
>>>>>>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>>>>>>
>>>>>>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>>>>>>
>>>>>>>>>>>>> ~ David Smiley
>>>>>>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>>>>>>> is this currently possible using this extension?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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 should fit.

~ David

On Jul 21, 2011, at 12:40 PM, Jamie Johnson wrote:

> 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 TO 40.523071289063])
> +DistanceValueSource(org.apache.lucene.spatial.base.distance.EuclidianDistanceCalculator@c7d9406)
> 
> Given that does point support doing what I am trying to do or should I
> be using another field type?
> 
> I understand that you're busy so no rush on this.
> 
> On Thu, Jul 21, 2011 at 11:48 AM, Jamie Johnson <je...@gmail.com> wrote:
>> 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. <ds...@mitre.org> wrote:
>>> 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 the kilometer detail level.  By default, that parameter is .001 -- 1 meter.
>>> 
>>> If you are talking about your query shape, then this same parameter can be supplied as a request parameter.  Again, the default is .025. The RecursiveGridFieldType can handle infinite query side precision, so you can supply 0 and still get reasonable performance. However if your indexing side is a certain precision, then there's little point in using more precision on the query side since in-effect it's as accurate as your index side.
>>> 
>>> If you're wondering more about the meaning of distErrPct, see this snippet from SpatialArgs.java:
>>>  /**
>>>   * The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable
>>>   * error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes
>>>   * the shape to a square given it's bounding box area:
>>>   * <pre>sqrt(shape.bbox.area)/2</pre>
>>>   * And the error distance is beyond the shape such that the shape is a minimum shape.
>>>   */
>>>  public Double getDistPrecision() {
>>> 
>>> ~ David
>>> 
>>> On Jul 20, 2011, at 5:44 PM, Jamie Johnson wrote:
>>> 
>>>> 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. <ds...@mitre.org> wrote:
>>>>> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>>>>> Thanks for the update David, I'll give that a try now.
>>>>>>>>> 
>>>>>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>>>>> 
>>>>>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>>>>> 
>>>>>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>>>>> 
>>>>>>>>>>>> ~ David Smiley
>>>>>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>>>>> 
>>>>>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>>>>>> is this currently possible using this extension?
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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 TO 40.523071289063])
+DistanceValueSource(org.apache.lucene.spatial.base.distance.EuclidianDistanceCalculator@c7d9406)

Given that does point support doing what I am trying to do or should I
be using another field type?

I understand that you're busy so no rush on this.

On Thu, Jul 21, 2011 at 11:48 AM, Jamie Johnson <je...@gmail.com> wrote:
> 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. <ds...@mitre.org> wrote:
>> 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 the kilometer detail level.  By default, that parameter is .001 -- 1 meter.
>>
>> If you are talking about your query shape, then this same parameter can be supplied as a request parameter.  Again, the default is .025. The RecursiveGridFieldType can handle infinite query side precision, so you can supply 0 and still get reasonable performance. However if your indexing side is a certain precision, then there's little point in using more precision on the query side since in-effect it's as accurate as your index side.
>>
>> If you're wondering more about the meaning of distErrPct, see this snippet from SpatialArgs.java:
>>  /**
>>   * The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable
>>   * error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes
>>   * the shape to a square given it's bounding box area:
>>   * <pre>sqrt(shape.bbox.area)/2</pre>
>>   * And the error distance is beyond the shape such that the shape is a minimum shape.
>>   */
>>  public Double getDistPrecision() {
>>
>> ~ David
>>
>> On Jul 20, 2011, at 5:44 PM, Jamie Johnson wrote:
>>
>>> 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. <ds...@mitre.org> wrote:
>>>> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>>>> Thanks for the update David, I'll give that a try now.
>>>>>>>>
>>>>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>>>>
>>>>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>>>>
>>>>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>>>>
>>>>>>>>>>> ~ David Smiley
>>>>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>>>>
>>>>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>>>>> is this currently possible using this extension?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>

Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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. <ds...@mitre.org> wrote:
> 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 the kilometer detail level.  By default, that parameter is .001 -- 1 meter.
>
> If you are talking about your query shape, then this same parameter can be supplied as a request parameter.  Again, the default is .025. The RecursiveGridFieldType can handle infinite query side precision, so you can supply 0 and still get reasonable performance. However if your indexing side is a certain precision, then there's little point in using more precision on the query side since in-effect it's as accurate as your index side.
>
> If you're wondering more about the meaning of distErrPct, see this snippet from SpatialArgs.java:
>  /**
>   * The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable
>   * error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes
>   * the shape to a square given it's bounding box area:
>   * <pre>sqrt(shape.bbox.area)/2</pre>
>   * And the error distance is beyond the shape such that the shape is a minimum shape.
>   */
>  public Double getDistPrecision() {
>
> ~ David
>
> On Jul 20, 2011, at 5:44 PM, Jamie Johnson wrote:
>
>> 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. <ds...@mitre.org> wrote:
>>> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>>> Thanks for the update David, I'll give that a try now.
>>>>>>>
>>>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>>>
>>>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>>>
>>>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>>>
>>>>>>>>>> ~ David Smiley
>>>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>>>
>>>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>>>
>>>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>>>> is this currently possible using this extension?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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 the kilometer detail level.  By default, that parameter is .001 -- 1 meter.

If you are talking about your query shape, then this same parameter can be supplied as a request parameter.  Again, the default is .025. The RecursiveGridFieldType can handle infinite query side precision, so you can supply 0 and still get reasonable performance. However if your indexing side is a certain precision, then there's little point in using more precision on the query side since in-effect it's as accurate as your index side.

If you're wondering more about the meaning of distErrPct, see this snippet from SpatialArgs.java:
  /**
   * The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable
   * error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes
   * the shape to a square given it's bounding box area:
   * <pre>sqrt(shape.bbox.area)/2</pre>
   * And the error distance is beyond the shape such that the shape is a minimum shape.
   */
  public Double getDistPrecision() {

~ David

On Jul 20, 2011, at 5:44 PM, Jamie Johnson wrote:

> 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. <ds...@mitre.org> wrote:
>> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>> Thanks for the update David, I'll give that a try now.
>>>>>> 
>>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>> 
>>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>> 
>>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>> 
>>>>>>>>> ~ David Smiley
>>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>> 
>>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>> 
>>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>>> is this currently possible using this extension?
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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. <ds...@mitre.org> wrote:
> 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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>> Thanks for the update David, I'll give that a try now.
>>>>>
>>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>>>
>>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>>>
>>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>>>
>>>>>>>> ~ David Smiley
>>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>>>
>>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>>>
>>>>>>>>> I have looked at the code being shared on the
>>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>>> is this currently possible using this extension?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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 Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>> Thanks for the update David, I'll give that a try now.
>>>> 
>>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>> 
>>>>>> 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. <ds...@mitre.org> wrote:
>>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>> 
>>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>> 
>>>>>>> ~ David Smiley
>>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>> 
>>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>> 
>>>>>>>> I have looked at the code being shared on the
>>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>>> is this currently possible using this extension?
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
Where do you set that?

On Wed, Jul 20, 2011 at 2:37 PM, Smiley, David W. <ds...@mitre.org> 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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>>> Thanks for the update David, I'll give that a try now.
>>>
>>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>>>
>>>>> 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. <ds...@mitre.org> wrote:
>>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>>>
>>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>>>
>>>>>> ~ David Smiley
>>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>>>
>>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>>>
>>>>>>> I have looked at the code being shared on the
>>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>>> is this currently possible using this extension?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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 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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
>> Thanks for the update David, I'll give that a try now.
>> 
>> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>> 
>>>> 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. <ds...@mitre.org> wrote:
>>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>> 
>>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>> 
>>>>> ~ David Smiley
>>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>> 
>>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>> 
>>>>>> I have looked at the code being shared on the
>>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>>> some details as to its state.  Specifically I'm looking to add
>>>>>> geospatial support to my application based on a user provided polygon,
>>>>>> is this currently possible using this extension?
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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, Jul 20, 2011 at 12:13 PM, Jamie Johnson <je...@gmail.com> wrote:
> Thanks for the update David, I'll give that a try now.
>
> On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>>
>>> 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. <ds...@mitre.org> wrote:
>>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>>
>>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>>
>>>> ~ David Smiley
>>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>>
>>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>>
>>>>> I have looked at the code being shared on the
>>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>>> some details as to its state.  Specifically I'm looking to add
>>>>> geospatial support to my application based on a user provided polygon,
>>>>> is this currently possible using this extension?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>

Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
Thanks for the update David, I'll give that a try now.

On Wed, Jul 20, 2011 at 10:58 AM, Smiley, David W. <ds...@mitre.org> 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 wrote:
>
>> 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. <ds...@mitre.org> wrote:
>>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>>>
>>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>>>
>>> ~ David Smiley
>>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>>>
>>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>>>
>>>> I have looked at the code being shared on the
>>>> lucene-spatial-playground and was wondering if anyone could provide
>>>> some details as to its state.  Specifically I'm looking to add
>>>> geospatial support to my application based on a user provided polygon,
>>>> is this currently possible using this extension?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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.  Thanks again.
> 
> On Tue, Jul 19, 2011 at 3:51 PM, Smiley, David W. <ds...@mitre.org> wrote:
>> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>> 
>> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>> 
>> ~ David Smiley
>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>> 
>> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>> 
>>> I have looked at the code being shared on the
>>> lucene-spatial-playground and was wondering if anyone could provide
>>> some details as to its state.  Specifically I'm looking to add
>>> geospatial support to my application based on a user provided polygon,
>>> is this currently possible using this extension?
>> 
>> 
>> 
>> 
>> 
>> 
>> 


Re: Geospatial queries in Solr

Posted by Jamie Johnson <je...@gmail.com>.
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. <ds...@mitre.org> wrote:
> 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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.
>
> Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.
>
> ~ David Smiley
> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>
> On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:
>
>> I have looked at the code being shared on the
>> lucene-spatial-playground and was wondering if anyone could provide
>> some details as to its state.  Specifically I'm looking to add
>> geospatial support to my application based on a user provided polygon,
>> is this currently possible using this extension?
>
>
>
>
>
>
>

Re: Geospatial queries in Solr

Posted by "Smiley, David W." <ds...@mitre.org>.
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 trunk codebase, and follow the README.  It points to another README which shows off a demo webapp.  At the conclusion of this, you'll need to examine the tests and webapp a bit to figure out how to apply it in your app.  We don't yet have a tutorial as the framework has been in flux  although it has stabilized a good deal.

Oh... by the way, this works off of Lucene/Solr trunk.  Within the past week there was a major change to trunk and LSP won't compile until we make updates.  Either Ryan McKinley or I will get to that by the end of the week.  So unless you have access to 2-week old maven artifacts of Lucene/Solr, you're stuck right now.

~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/

On Jul 19, 2011, at 3:03 PM, Jamie Johnson wrote:

> I have looked at the code being shared on the
> lucene-spatial-playground and was wondering if anyone could provide
> some details as to its state.  Specifically I'm looking to add
> geospatial support to my application based on a user provided polygon,
> is this currently possible using this extension?