Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "SpatialSearch" page has been changed by Bill Bell: http://wiki.apache.org/solr/SpatialSearch?action=diff&rev1=71&rev2=72 This returns the as the score - the closest distance for 2 points that the user wants to check near (Denver and San Francisco): - . [[http://localhost:8983/solr/provs2/select?q=*:*&sort=min(geodist(store_lat_lon,37.7,-122.4),geodist(store_lat_lon,39.7,-105)) asc&fl=store_lat_lon,score]] + . http://localhost:8983/solr/provs2/select?q=*:*&sort=min(geodist(store_lat_lon,37.7,-122.4),geodist(store_lat_lon,39.7,-105))%20asc&fl=store_lat_lon,score Or - . [[http://localhost:8983/solr/provs2/select?q={!func}min(geodist(store_lat_lon,37.7,-122.4),geodist(store_lat_lon,39.7,-105))&sort=score asc&fl=store_lat_lon,score]] + . http://localhost:8983/solr/provs2/select?q={!func}min(geodist(store_lat_lon,37.7,-122.4),geodist(store_lat_lon,39.7,-105))&sort=score%20asc&fl=store_lat_lon,score == Returning the distance == <!> [[Solr4.0]] @@ -104, +104 @@ As a temporary workaround for older Solr versions, it's possible to obtain distances by using geodist or geofilt as the only scoring part of the main query. + . [[http://localhost:8983/solr/select?indent=true&fl=name,store&q=*:*&sfield=store&pt=45.15,-93.85&sort=score%20asc&q={!func}geodist()|http://localhost:8983/solr/select?indent=true&fl=name,store&sfield=store&pt=45.15,-93.85&sort=score%20asc&q={!func}geodist()]] - . [[http://localhost:8983/solr/select?indent=true&fl=name,store&q=*:*&sfield=store&pt=45.15,-93.85&sort=score%20asc&q={!func}geodist()]] - = Other Use Cases = == How to combine with a sub-query to expand results ==