lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afilipc...@gmail.com
Subject Re: Lucene GeoNear Search and Sort Performance
Date Wed, 05 Jul 2017 17:31:53 GMT
That worked! Thank you!

Thank you,
Alex

> On Jul 1, 2017, at 2:09 PM, Michael McCandless <lucene@mikemccandless.com> wrote:
> 
> You can use LatLonPoint.newDistanceQuery to get the results within the
> specified distance, and then use LatLonDocValuesField.newDistanceSort to
> sort by distance, and use the IndexSearcher.search method that takes Sort.
> Then the results should be all points within the radius, sorted by
> distance.  That should (maybe) be faster than computing haversin yourself
> on all hits.
> 
> Extending LatLonPoint.nearest to take a distance instead of top N should be
> possible ... maybe open an issue?
> 
> Mike McCandless
> 
> http://blog.mikemccandless.com
> 
>> On Thu, Jun 29, 2017 at 1:41 PM, sc <scattamanchi@4info.com> wrote:
>> 
>> Thank you so much. With LatLonPoint.nearest(..), I am getting results in
>> 6ms,
>> with accurate results, when I compared MongoDB.geoNear().
>> 
>> I also  tried with LatLonPoint.newDistanceQuery, and I got results in 6ms
>> but the results are NOT the nearest points.
>> 
>> Few more questions:
>> 
>> Is there an API that use with LatLonPoint.nearest where I can specify the
>> radius.
>> 
>> Or how can I sort results from LatLonPoint.newDistanceQuery?
>> 
>> Thanks again.
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://lucene.472066.n3.nabble
>> .com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4343502.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 

---------------------------------------------------------------------
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