lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilton, Reece" <Reece.Wil...@dig.com>
Subject Multiple reads from an IndexSearcher?
Date Wed, 10 Sep 2003 01:03:12 GMT
Hi,

I have a single IndexSearcher pointing at an index.  Multiple threads
are calling the search method.  Is this safe to do?  I presume it is the
right way to do it instead of creating a new IndexSearcher per thread.

But I'm having the dreaded "Too many open files" exception.  I'm running
on Windows XP (of course, otherwise it would work!).  Any ideas on how
to fix this (other than upgrading to Linux)?  Is having one
IndexSearcher the right thing to do?  No other processes are accessing
this index so I'm surprised that I'm getting this error.

Here's the exception:

*E,17:25:19.649,/HyphenTest 5> java.io.IOException: Too many open files
*E,17:25:19.664,/HyphenTest 5> 	at
java.io.WinNTFileSystem.createFileExclusively(Native Method)
*E,17:25:19.664,/HyphenTest 5> 	at
java.io.File.createNewFile(File.java:828)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.store.FSDirectory$1.obtain(FSDirectory.java:324)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.store.Lock.obtain(Lock.java:91)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.store.Lock$With.run(Lock.java:146)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.index.IndexReader.open(IndexReader.java:103)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.index.IndexReader.open(IndexReader.java:91)
*E,17:25:19.664,/HyphenTest 5> 	at
org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:75)

Any help/advice is appreciated,
Reece

Mime
View raw message