lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: no segments* file found: files: Error on opening index
Date Mon, 27 Apr 2009 11:07:55 GMT
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.


On Mon, Apr 27, 2009 at 6:01 AM, Paul Taylor <> 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()+ "/" +
>> but I create an IndexReader as required
>>    IndexReader ir =;
>> 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message