lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Find "latest" document (before a certain date)
Date Wed, 29 Aug 2007 11:39:27 GMT

29 aug 2007 kl. 12.29 skrev Per Lindberg:

>> how about using a RangeQuery and pick the hit with the
>> greatest document number?
>
> Yep, that did the trick! There seems to be no Filter that can do
> the final picking of the highest date, so I had to do that after the
> search.
>
> I use IndexSearcher.search with a RangeFilter,
> I presume that's just as efficient as a RangeQuery?

It depends, espescially on how you use reuse the filter.

Benchmark to be sure


-- 
kalle


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