[ https://issues.apache.org/jira/browse/SOLR-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913493#action_12913493 ]
Grant Ingersoll commented on SOLR-2125: --------------------------------------- Couple of things: 1. I did find some other errors around radians, etc. I will work to fix today. bq. Although extending the 45 degree out would be a conservative estimate. And since we usually sort by distance asc, those extra points would be in the result set but at the end of the list. (this is an improvement - again not at good as ellipses). This FieldType is going to be implemented to be a bounding box around a circle of a radius specified by the passed in distance, which seems to be what most tools do, at least as one way of doing it. If you want, pick your distance based on the max distance of an ellipse or you can override LatLonType.createSpatialQuery to do so in your own FieldType. Naturally, this will overselect, but this bounding box stuff is meant to be a filter, like you said. You can then sort by distance later. > Spatial filter is not accurate > ------------------------------ > > Key: SOLR-2125 > URL: https://issues.apache.org/jira/browse/SOLR-2125 > Project: Solr > Issue Type: Bug > Components: Build > Affects Versions: 1.5 > Reporter: Bill Bell > Assignee: Grant Ingersoll > Attachments: Distance.diff, solrspatial.xlsx > > > 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 org.apache.solr.search.function.distance.Constants.EARTH_MEAN_RADIUS_KM) > 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 kilometers > 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)) > asc > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org