lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Reuschling <christian.reuschl...@gmail.com>
Subject Determining index term count
Date Wed, 07 Jan 2009 15:09:11 GMT
Is there a fast way to determine the total number of terms inside an index?

Currently I only found the way to walk through the TermEnumeration, i.e.

TermEnum termEnum4TermCount = reader.terms();
int iTermCount = 0;

while (termEnum4TermCount.next())
   iTermCount++;

termEnum4TermCount.close();


Thanks for all answers!

Christian

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