You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2011/12/05 04:14:34 UTC

[Solr Wiki] Update of "SpatialSearch" by Bill Bell

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=79&rev2=80

  
  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,37.7,-122.4),geodist(store,39.7,-105))%20asc&fl=store,score|...&sort=min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))%20asc]]
+  . [[http://localhost:8983/solr/select?q=*:*&sort=min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))%20asc&fl=store,score|...&sort=min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))%20asc]]
  
  Or
  
-  . [[http://localhost:8983/solr/provs2/select?q={!func}min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))&sort=score%20asc&fl=store,score|...&q={!func}min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))&sort=score%20asc]]
+  . [[http://localhost:8983/solr/select?q={!func}min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))&sort=score%20asc&fl=store,score|...&q={!func}min(geodist(store,37.7,-122.4),geodist(store,39.7,-105))&sort=score%20asc]]
+ 
+ In order to return the number of results that match using a facet:
+ 
+  . [[http://localhost:8983/solr/select?sfield=store&pt=45.15,-93.85&facet.query={!geofilt d=10 key=d10}&facet.query={!geofilt d=20 key=d20}&facet.query={!geofilt d=50 key=d50}]]
+ 
  
  == Returning the distance ==
  <!> [[Solr4.0]]