-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, all
I want to count all words in a index. I do this:
- ---------------------------
IndexReader reader = IndexReader.open( "MyIndex" );
TermEnum terminos = reader.terms();
int countWords = 0;
while( terminos.next() ) {
TermDocs td = reader.termDocs( terminos.term() );
while( td.next() ) countWords += td.freq();
}
- ----------------------------
but this is very slow in a large document number.
Could somebody say to me how to do this of another faster form?
Thank you very much in advance.
- --
Cecilio Cano Calonge � Czy
GNUpg Key = 5011 67C7 7C0B A513 C18F D93B 071B BA7C 9DF6 9399
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+8bzCBxu6fJ32k5kRAma9AJ4889mq5ewNRDV0NxLTV12TgRgVewCfaGZ5
9nsvgL/TL+kSFPb9krXfg6A=
=Lmji
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]