lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Lucene 2.9.0 leaves too many .cfs files open, causing too many files open java error.
Date Mon, 19 Oct 2009 13:39:10 GMT

On Oct 18, 2009, at 1:47 PM, GlenAbbeyDrive wrote:

>
> I commit the IndexWriter every 200 documents in a batch as follows  
> and you
> can see that I reopened the reader after the commit.
>
> private void commit(IndexWriter writer) throws CorruptIndexException {
> 		writer.commit();
> 		if(indexReader!=null)
> 			indexReader.reopen();
> }

You should be checking if the reader returned by reopen() is different  
than the one you have and then if it is, you need to close the old one  
at the appropriate time.

-Grant


--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


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