For now, I used LatLonPoint.newDistanceQuery(...) and
SloppyMath.haversinMeters to get the distance between center point and all
other points within 50m radius circle and sort them using Comparator.
I am able to get accurate results in < 10ms which is fine with me.
Code:
Query latlonQuery = LatLonPoint.newDistanceQuery("loc", minLat,
minLng,
50);
TopDocs docs = searcher.search(latlonQuery, 50);
Any other optimizations I can still do(Directory type etc) ?
Thanks,
--
View this message in context:
http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4343535.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]