lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PeterKerk <petervdk...@hotmail.com>
Subject geolocation search ignores distance parameter
Date Mon, 23 Nov 2015 00:39:16 GMT
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

<result name="response" numFound="20" start="0">
	<doc>
		<str name="lng">4.205799299999967</str>
		<str name="id">1803</str>
		<str name="lat">51.5320753</str>
		<double name="_dist_">127.50432946951436</double>
	</doc>
</result>	

schema.xml definitions

	<fieldType name="location" class="solr.LatLonType"
subFieldSuffix="_coordinate"/>	
    <field name="lng" type="string" indexed="true" stored="true"/>
    <field name="lat" type="string" indexed="true" stored="true"/>
	<field name="geolocation" type="location" indexed="true" stored="true"/>
	
	

I tried adding this to the query string: &fq=_dist_:10

but then I get the error: undefined field _dist_




--
View this message in context: http://lucene.472066.n3.nabble.com/geolocation-search-ignores-distance-parameter-tp4241564.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message