You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Emad Mushtaq <em...@sigmatec.com.pk> on 2010/03/03 12:48:25 UTC

Problems with variable geo_distance

Hi,

I am having a very strange problem, related to local solr. In my documents
there is a record for location called "Gujranwala" which is a city in
Pakistan. I try to get search results with respect to coordinates of
"Lahore" (another city of Pakistan). When I do a search within 100 miles,
there are no results. When I do a search of 200 miles, it gives me
Gujranwala in the end results. However the problem over here is that the
geo_distance it gives is 48.112120348665925. This result should had been in
the search within 100 miles since the geo_distance is 48.112.  Here is the
query that I was making:

http://localhost:8983/solr/select/?q=+title:*&qt=geo&lat=31.4845&long=74.3216&radius=100
http://localhost:8983/solr/select/?q=+title:*&qt=geo&lat=31.4845&long=74.3216&radius=200

The coordinates of Gujranwala is :
<double name="latitude">32.168652</double>
<double name="longitude">74.173981</double>

I would appreciate any help on this.

Thanks



-- 
Muhammad Emad Mushtaq
http://www.emadmushtaq.com/