lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp <sprad...@4info.com>
Subject Re: Ring geospatial query
Date Fri, 22 Dec 2017 19:56:38 GMT
Thanks Adrien. 

My documents do have a single geo-point, and your suggestion worked. This is
my final code.

	Query latlonQuery = LatLonPoint.newDistanceQuery("loc", lat. lon,
outerRadiusMeters);
	Query innerRadiusQuery = LatLonPoint.newDistanceQuery("loc", lat, lon,
innerRadiusMeters);
	latlonQuery = new BooleanQuery.Builder()
			    .add(latlonQuery, BooleanClause.Occur.MUST)
			    .add(innerRadiusQuery, BooleanClause.Occur.MUST_NOT)
			    .build();

Thanks again.




--
Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message