On Sat, Apr 4, 2009 at 10:25 AM, deminix <demi...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to