[
https://issues.apache.org/jira/browse/SOLR-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876527#action_12876527
]
Darren Govoni commented on SOLR-1568:
-------------------------------------
Yeah, I brought this issue up on the mailing list. Its a problem that
originates in other blogs circulating about doing ranged queries on SQL tables
to achieve spatial. In that context it works because the lat and lot are
constrained together in the row. In solr documents you can have numerous free
floating lats and lons values so a range query cannot be used alone. The
intermediate lat lon results from a ranged calculus need to be constrained
_together_ otherwise false positives can occur (e.g. separate points have a lat
and lon that individually satisfy the range but the _point_ does not).
Still waiting to understand how it will work. Currently, it is not _entirely_
spatial.
Also, the distance parameter for points. How is it to be used for bounding box,
where the distance varies? In that case, calculating distance across the extent
of the box is a waste of cpu - a different calculation is needed for that - and
a joined ranged could work.
I have a proposal to fix this if its needed.
> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]