lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <m...@ctx.com.au>
Subject Re: Iterating TermEnum backwards
Date Thu, 26 Feb 2004 21:46:14 GMT
>> I know I could "invert" my dates (something like MAX_LONG - date) to get
>> the REVERSE order, but I want to be able to do "least recent" and "most
>> recent".
> 
> 
> Why not have two date fields, one inverted and one not?
> 
>> PS: my current solution is to do a binary search between MIN and MAX,
>> halving my search space until I find close to N matching documents.
> 
> 
> That doesn't sound like a bad solution.


Cool, thanks for all your suggestions. I'm getting adequate performance 
from my binary search now, and if it really becomes a performance 
problem, I'll just index an inverted version of the date (we all have 
diskspace to spare!).

=Matt

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


Mime
View raw message