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 01:47:56 GMT
> 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).

Thanks Mike.

On Sun, Feb 20, 2011 at 2:51 PM, Michael McCandless
<lucene@mikemccandless.com> wrote:
> On Sat, Feb 19, 2011 at 8:42 AM, Jason Rutherglen
> <jason.rutherglen@gmail.com> wrote:
>
>>> But you have to
>>> use a terms index impl that supports ord (eg FixedGap).
>>
>> Ok, and the VariableGap is the new standard because the FST is much
>> more efficient as a terms index?  Perhaps I'd need to create a codec
>> (or patch the existing) to automatically store the max term?
>
> It's really easy to make a codec that eg copies Standard but swaps in
> FixedGap terms index instead...
>
> 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).
>
> --
> 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