[ 
https://issues.apache.org/jira/browse/SOLR-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883177#action_12883177
 ] 

Grant Ingersoll commented on SOLR-1568:
---------------------------------------

OK, here's my take on dealing w/ the poles.

I know how to determine when we crossed the pole (you can use angular distance 
and latitude), so my proposal is that we handle the poles in a slightly 
different way than the typical "bounding box" approach b/c the queries get too 
complicated.  

I have two proposals for dealing with the Poles:

# Document that we do not deal with the poles and throw an exception.  Someone 
who needs calculations around the pole can implement their own projection and 
likely come up w/ a far better way of handling things than I have time for at 
the moment.
# Instead of a bounding box, create a bounding bowl by taking the smaller 
(closer to the equator) latitude (i.e. the lower left latitude) and then get 
all points that are above this latitude.  Obviously, this is inaccurate when 
considered in light of the bounding box model, but it will be faster/simpler 
and will mainly be a documentation issue and is better than simply throwing an 
exception.

Thoughts?  I'm also open to others who have more knowledge about dealing with 
the Poles to produce a patch.

> Implement Spatial Filter
> ------------------------
>
>                 Key: SOLR-1568
>                 URL: https://issues.apache.org/jira/browse/SOLR-1568
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: Next
>
>         Attachments: CartesianTierQParserPlugin.java, 
> SOLR-1568.Mattmann.031010.patch.txt, SOLR-1568.patch, SOLR-1568.patch, 
> SOLR-1568.patch, SOLR-1568.patch, SOLR-1568.patch, SOLR-1568.patch, 
> SOLR-1568.patch, SOLR-1568.patch, SOLR-1568.patch
>
>
> Given an index with spatial information (either as a geohash, 
> SpatialTileField (see SOLR-1586) or just two lat/lon pairs), we should be 
> able to pass in a filter query that takes in the field name, lat, lon and 
> distance and produces an appropriate Filter (i.e. one that is aware of the 
> underlying field type for use by Solr. 
> The interface _could_ look like:
> {code}
> &fq={!sfilt dist=20}location:49.32,-79.0
> {code}
> or it could be:
> {code}
> &fq={!sfilt lat=49.32 lat=-79.0 f=location dist=20}
> {code}
> or:
> {code}
> &fq={!sfilt p=49.32,-79.0 f=location dist=20}
> {code}
> or:
> {code}
> &fq={!sfilt lat=49.32,-79.0 fl=lat,lon dist=20}
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to