Hello,

Yes, there is a limit, but it's pretty high:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#MAX_VALUE

Iterating the index like that is ok, but each call do
reader.document(int) pulls the entire Document off the disk, which can
get expensive.

The link to list archives should be on lucene.apache.org.

Otis


--- Tomcat Programmer <[EMAIL PROTECTED]> wrote:
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to