lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: numDocs method of IndexReader
Date Wed, 20 Apr 2005 02:31:08 GMT
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 <tcprogrammer@yahoo.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 

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