It's fine if one thread is changing the index (w/ IndexWriter) while other threads are opening IndexReaders.
Though, if you have IndexWriter opening with "create=true" at the same time that an IndexReader is attempting to open the index, that would explain this. Is it possible that's happening? The fact that you see no files listed in the exception's message means the directory was empty at the time IndexReader was being openened. Mike On Mon, Apr 27, 2009 at 6:01 AM, Paul Taylor <paul_t...@fastmail.fm> wrote: > Paul Taylor wrote: >> >> Hi I was using a RAMDirectory and this was working fine but have now moved >> over to a filesystem directory to preserve space, the directory is just >> initialized once >> directory = new RAMDirectory(); >> directory = >> FSDirectory.getDirectory(Platform.getPlatformLicenseFolder()+ "/" + >> TAG_BROWSER_INDEX); >> >> but I create an IndexReader as required >> IndexReader ir = IndexReader.open(directory); >> and then close it when Ive finished with it. >> >> but sometimes it is failing with >> no segments* file found: files: >> interestingly no file is specified in the error message whereas other >> reporters of this message show a reference to an actual file in the message. >> >> My code is multithreaded so I'm wondering if the problem is that two >> thread have both opened an IndexReader, or one thread is using an >> IndexWriter to add a document, whilst another is trying to read. But I wasnt >> aware either of these cases was not allowed, any ideas ? >> >> thanks Paul >> > Hi, anybody have an idea about this, Im sure Im not the only one to > encounter this. > > Paul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org