lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbodeguilla <>
Subject IndexReader and numDocs
Date Thu, 16 Apr 2009 11:31:11 GMT

Hello!!! My problem is that when I see the number or documents through
IndexWriter I see the number is 1 document. If I open IndexReader, the
numDocs sais there are no Documents...why???May u help me,please????

               System.out.println(writerFS.numDocs());//there es 1 document

               Directory dir=writerFS.getDirectory();
               IndexReader ir=;
               System.out.println(ir.numDocs());//there are 0 documents

Thanks a lot!!
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message