: q={!func}geodist()&sfield=latlng&pt=28.635308,77.22496&sort=score+asc
        ...
: Problem : For those documents which doesn't have latlng field, value is 
coming exceptionally large '8763.191'.

I'm pretty sure you're seeing the function assume a default lat,lon of 
"0,0" for docs thta you haven't given a position.

If you don't have a location on every doc, you're probably going to want 
to use a filter query to exclude docs that have no location -- i'm not 
sure off the top of my head how to do that.

: How can I limit this maximum distance(i.e score) as 25?

apply another fq that filters by distance, either using bbox or geofilt...

http://wiki.apache.org/solr/SpatialSearch#bbox_-_Bounding-box_filter
http://wiki.apache.org/solr/SpatialSearch#geofilt_-_The_distance_filter

...but you'll still want to find a way ot filter out docs with no latlon 
values, otherwise you're going to get false positives if your input point 
ever happens to be within 25km of "0,0"


-Hoss

Reply via email to