lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bart_212 <wojtekg...@gmail.com>
Subject reopen with optimize and FileNotFoundException
Date Wed, 09 Mar 2011 19:44:32 GMT
Hi,
I have two web applications that uses lucene 2.3.2. Both share the same
index and can write or read. Writing is synchronized based on file system to
allow only one IndexWriter to work at the moment. There can be multiple
IndexReader. IndexReader is stored and before searching, there is done
#reopen on it. IndexWriter can add/delete group of documents and can
optimize the index while searching is performed (multiple threads can
search).
I'm wondering if these operations are thread safe and don't corrupt the
index? I have observed the following exception when one IndexWriter was
adding  and one IndexReader was reopened to search:

java.io.FileNotFoundException: /tmp/test/index/_7y.tis
RandomAccessFile.open(String, int) line: not available [native method]
FSDirectory$FSIndexInput$Descriptor(RandomAccessFile).(File, String) line:
212
FSDirectory$FSIndexInput$Descriptor.(File, String) line: 506
FSDirectory$FSIndexInput.(File, int) line: 536
FSDirectory.openInput(String, int) line: 445
TermInfosReader.(Directory, String, FieldInfos, int) line: 61
SegmentReader.initialize(SegmentInfo, int, boolean) line: 317
SegmentReader.get(Directory, SegmentInfo, SegmentInfos, boolean, boolean,
int, boolean) line: 262
SegmentReader.get(SegmentInfo) line: 197
MultiSegmentReader.(Directory, SegmentInfos, boolean, SegmentReader[],
int[], Map) line: 109
MultiSegmentReader.doReopen(SegmentInfos) line: 203
DirectoryIndexReader$2.doBody(String) line: 98
DirectoryIndexReader$2(SegmentInfos$FindSegmentsFile).run() line: 636
MultiSegmentReader(DirectoryIndexReader).reopen() line: 92
IndexReaderManager.reopenReader(FileProxy, IndexReader) line: 92
IndexReaderManager.getIndexReader(FileProxy) line: 76
IndexSearcherFactory.createIndexSearcher(FileProxy) line: 66

This exception is caught inside, however is it ok that the file is missing
or maybe there is some problem with usage? Please clarify.

--
View this message in context: http://lucene.472066.n3.nabble.com/reopen-with-optimize-and-FileNotFoundException-tp2656875p2656875.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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