lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (SOLR-2125) Spatial filter is not accurate
Date Tue, 21 Sep 2010 01:19:33 GMT


Yonik Seeley commented on SOLR-2125:

Hmmm, well, I just corrected one bug that hard-coded the distance in miles, but it was just
a check to see if we crossed the poles.
I don't think that change alone will fix your issue.

Earlier today, I switched around some fields/field-types in the example schema, so "store"
is now of latlon type, and it's the only location type (having multiple is just confusing).

So just looking at the bounding box now, here's the URL from your example:

And I can see that the generated bounding box is:
+store_0_coordinate:[43.129843715965166 TO 46.688683890119314] +store_1_coordinate:[-93.83266208454557
TO -88.79716545231159]

Which just misses the longitude of the point on the document of -93.87341.

Can anyone point to an webapp for checking arbitrary distances between two lat/lon points?

> Spatial filter is not accurate
> ------------------------------
>                 Key: SOLR-2125
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.5
>            Reporter: Bill Bell
> The calculations of distance appears to be off.
> Note: "The radius of the sphere to be used when calculating distances on a sphere (i.e.
haversine). Default is the Earth's mean radius in kilometers (see
which is set to 3,958.761458084784856. Most applications will not need to set this."
> The radius of the earth in KM is  6371.009 km (≈3958.761 mi).
> Also filtering distance appears to be off - example data:
> 45.17614,-93.87341 to 44.9369054,-91.3929348 Approx 137 miles Google. 169 miles = 220
> http://....../solr/select?fl=*,score&start=0&rows=10&q={!sfilt%20fl=store_lat_lon}&qt=standard&pt=44.9369054,-91.3929348&d=280&sort=dist(2,store,vector(44.9369054,-91.3929348))
> Nothing shows. d=285 shows results. This is off by a lot.
> Bill

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