lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Trivial Update of "SpatialSearch" by YonikSeeley
Date Sat, 30 Jul 2011 15:44:50 GMT
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 YonikSeeley:


  You can use the pseudo-field feature to return the distance along with the stored fields
of each document by adding '''fl=geodist()''' to the request.  Use an alias like '''fl=_dist_:geodist()'''
to make the distance come back in the '''_dist_''' pseudo-field instead.  Here is an example
of sorting by distance ascending and returning the distance for each document in '''_dist_'''.
-  . [[http://localhost:8983/solr/select?wt=json&indent=true&fl=name,store&q=*:*&sfield=store&pt=45.15,-93.85&sort=geodist()%20asc&fl=_dist_:geodist()|...&q=*:*&sfield=store&pt=45.15,-93.85&sort=geodist()
+  . [[http://localhost:8983/solr/select?wt=json&indent=true&fl=name,store&q=*:*&sfield=store&pt=45.15,-93.85&sort=geodist()%20asc&fl=_dist_:geodist()|...&q=*:*&sfield=store&pt=45.15,-93.85&sort=geodist()
  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.

View raw message