lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Term Limit?
Date Sat, 04 Apr 2009 15:44:59 GMT
On Sat, Apr 4, 2009 at 10:25 AM, deminix <> wrote:

> AFAIK there isn't an api that returns the current number of terms, correct?

Alas, no.  This limitation has been talked about before... maybe we
should add it.

But: it's not actually simple to compute, at the MultiSegmentReader
level.  Each SegmentReader knows the unique term count, though.

I wonder if we could expose the API, but if you call it on a
MultiSegmentReader, it will throw UnsupportedOperationException.
Instead, you could call getSequentialSubReaders (added in 2.9), and
ask those readers for the unique term count.  Would something like
that work?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message