lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1568) Implement Spatial Filter
Date Mon, 05 Apr 2010 21:58:27 GMT

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

Chris A. Mattmann commented on SOLR-1568:
-----------------------------------------

+1 on the latest patch with the following caveat:

Why not put:

{code}
   public static final double DEGREES_TO_RADIANS = Math.PI / 180.0;
   public static final double RADIANS_TO_DEGREES = 180.0 / Math.PI;
+  public static final double DEG_45 = Math.PI / 4.0;
+  public static final double DEG_225 = 5 * DEG_45;
+  public static final double DEG_90 = Math.PI / 2;
+  public static final double DEG_180 = Math.PI;
+  public static final double SIN_45 = Math.sin(DEG_45);
{code}

into  solr/src/java/org/apache/solr/search/function/distance/Constants.java, and then make
DistanceUtils implement (or static import) those constants?

Cheers,
Chris


> 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, 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
>
>
> 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.


Mime
View raw message