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

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

bq. And how would that be specified out of the box? 

It's just a simple range query:  point:[33.5,-80 TO 35.0,-81]  or some other 
similar thing.  The point is that Solr already supports this, so I don't see a 
lot to be gained by actually doing it in Solr.

bq. (example please?) You're not suggesting that be delegated to the user do 
you? That's very hard, very field specific, and will often result in multiple 
range queries, not one.

It doesn't strike me as that hard, but perhaps I'm missing something.  Many 
times this stuff is automatically generated by a user clicking on a map or via 
other, application side calculations.

bq. I actually executed the lucene query as part of the filter

That's interesting.  So, you end up calculating it twice, once for scoring and 
once for filtering?  I can see why that would speed things up.

> 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: 1.5
>
>         Attachments: CartesianTierQParserPlugin.java
>
>
> 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.

Reply via email to