lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] Commented: (SOLR-1568) Implement Spatial Filter
Date Fri, 07 May 2010 13:44:51 GMT


David Smiley commented on SOLR-1568:

I've finally tried this out successfully.  But I needed a lat-lon box search, not a circle.
 It wasn't hard to modify the code to offer a lower-left point and upper-right point.  I only
implemented this for the Spatial Tiers point implementation.  The odd part was that the code
internally wanted to know the diameter of a circle based search in miles.  So I translated
this to the distance from one corner of the box search to the oppose one... then divided by
the square root of 2 to reduce this amount to what the diameter would be of a circle fitting
*within* the box search.

I haven't bothered with any scoring modification, I'm most interested in filtering.

> Implement Spatial Filter
> ------------------------
>                 Key: SOLR-1568
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.5
>         Attachments:, 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
> 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:
For additional commands, e-mail:

View raw message