lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Term Limit?
Date Sat, 04 Apr 2009 15:44:59 GMT
On Sat, Apr 4, 2009 at 10:25 AM, deminix <deminix@gmail.com> 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?

Mike

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