On 02.08.2012 01:52, Anand Henry wrote:
Hi,
In SOLR 3.4, while doing a geo-spatial search, is there a way to retrieve
the distance of each document from the specified location?
Not that I know of.
What we did was to read and parse the location field on client side and
calculate the distance on our own using this library:
http://code.google.com/p/simplelatlng/
However, it's not as "nice" as getting the distance from Solr, and
sometimes the distances seem to slightly differ - e.g. when you filter
up to a distance of 100 km, there are cases where the client library
still computes 100.8 km or so.
But at least, it's working.
-Kuli