You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Tomcat Programmer <tc...@yahoo.com> on 2005/04/19 23:11:00 UTC

numDocs method of IndexReader

Hello Everyone, 

I need to be able to iterate through the entire set of
documents within the index to perform some auditing. I
originally tried the following code snip:

int ndoc = idxReader.numDocs();
for (int i=0; i< ndoc; i++) {
    Document doc = idxReader.document(i);
    . 
    . 
    .
}

This is working with my initial project here, where
the number of Documents are small. I am concerned when
the indexes grow larger. Since this method returns an
int, does this mean that I am limited by the size of
an integer to the number of documents I can have? 

Also, I wanted to search the archives of this list to
see if anyone had previously answered this question,
but I could not find a site that archives this list.
Can any one point me to such a site? 

Many thanks in advance, 

Tom C. 








		
__________________________________ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org