On 11/22/2015 5:39 PM, PeterKerk wrote:
> Why is the result below returned even though I'm filtering in a radius of 20
> from geocoordinates defined in pt parameter in the querystring?
> As you can see the result in _dist_ in this result is is far larger than 20.
>
> http://localhost:8983/solr/locs/select/?indent=on&facet=true{!geofilt}&pt=51.98,5.91111&sfield=geolocation&d=20&sort=geodist()%20asc&q=*:*&start=0&rows=12&fl=id,_dist_:geodist(),lat,lng
Disclaimer: I've never used any of the spatial features in Solr. I
have no idea whether I've got right or wrong info here.
I did some digging in the documentation, and based on what I found, your
geofilt syntax looks wrong. I'm reasonably sure that localparams like
{!geofilt} must be at the beginning of the main query or a filter query
-- they cannot stand alone, and attaching it to the facet parameter
seems incorrect. Adjusting your parameter list so it looks right, I get
the following:
indent=on
facet=true
fq={!geofilt sfield=geolocation}
pt=51.98,5.91111
d=20
sort=geodist() asc
q=*:*
start=0
rows=12
fl=id,_dist_:geodist(),lat,lng
Thanks,
Shawn