Or use IndexWriter.setUseCompundFile(true) to reduce the number of files created by Lucene.
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexWriter.html#setUseCompoundFile(boolean)
=Matt
Kevin A. Burton wrote:
Dan wrote:
I have some code that creates a lucene index. It has been working fine with lucene-1.3-rc1.jar but I wanted to upgrade to lucene-1.3-final.jar. I did this and the indexer breaks. I get the following error when running the index with 1.3-final:No... it's you... ;)
Optimizing the index
IOException: /home/danl001/index-Mar-22-14_31_30/_ni.f43 (Too many open files)
Indexed 884 files in 8 directories
Index creation took 242 seconds
%
Read the FAQ and then run
ulimit -n 1000000 or so...
You need to increase your file handles. Chance are you never noticed this before but the problem was still present. If you're on a Linux box you would be amazed to find out that you're only about 200 file handles away from running out of your per-user quota file quota.
You might have to su as root to change this.. RedHat is more strict because it uses the glibc resource restrictions thingy. (who's name slips my mind at the moment).
Debian is configured better here as per defaults.
Also a google query would have solved this for you very quickly ;)..
Kevin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
