lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rutherglen <jason.rutherg...@gmail.com>
Subject Re: Last/max term in Lucene 4.x
Date Mon, 21 Feb 2011 19:21:38 GMT
> Maybe we need a seekFloor in the TermsEnum?  (What we have now is
> really seekCeil).  But, what's the larger use case here..?

I opened an issue LUCENE-2930 to simply store the last/max term,
however the seekFloor would work just as well.  The use case is
finding the last of the ordered IDs stored in the index, so that
remaining documents (that lets say were left in RAM prior to process
termination) can be indexed.  It's an inferred transaction checkpoint.

On Mon, Feb 21, 2011 at 5:31 AM, Michael McCandless
<lucene@mikemccandless.com> wrote:
> On Sun, Feb 20, 2011 at 8:47 PM, Jason Rutherglen
> <jason.rutherglen@gmail.com> wrote:
>>> Though, if you just want to get to the last term... VarGap's terms
>>> index can quickly tell you the last indexed term, and from there you
>>> can scan to the last term?  (It'd be at most 32 (by default) scans).
>>
>> In VariableGapTermsIndexReader, IndexEnum doesn't support ord.  How
>> would I seek to the last term in the index using VarGaps?  Or do I
>> need to interact directly with the FST class (and if so I'm not sure
>> what to do there either).
>
> Right, you'd have to work directly w/ the FSTEnum (ie, code changes).
> The FSTEnum "feels" like a TreeMap, so, you can eg seekFloor to eg
> 0xffffffff, get the term, seek the TermsEnum there, then .next() until
> you hit the end.
>
> Maybe we need a seekFloor in the TermsEnum?  (What we have now is
> really seekCeil).  But, what's the larger use case here..?
>
> Mike
>
> --
> Mike
>
> http://blog.mikemccandless.com
>

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