lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roxana Angheluta <rox...@attentio.com>
Subject how to get the number of terms in an index
Date Sat, 03 Jun 2006 17:31:05 GMT
Hello,

Is it possible to quickly get the total number of terms from all
documents in an Lucene index  for a given field?
For example IndexReader has a method "int numDocs()", I would need  a
similar method "int numTerms(String field)".
It looks a bit silly to use IndexReader.terms() and count the number of
terms by iterating over the result.

Thanks,
Roxana

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