Hello all,
I am using version 2.4. The following code throws AlreadyClosedException
IndexReader reader = searcher.getIndexReader();
IndexReader newReader = reader.reopen();
if (reader != newReader) {
reader.close();
boolean isCurrent = newReader.isCurrent(); //throws exception
}
Full list of exception:
--------------------
org.apache.lucene.store.AlreadyClosedException: this Directory is closed
at org.apache.lucene.store.Directory.ensureOpen(Directory.java:220)
at org.apache.lucene.store.FSDirectory.list(FSDirectory.java:320)
at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:533)
at
org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:366)
at
org.apache.lucene.index.DirectoryIndexReader.isCurrent(DirectoryIndexReader.java:188)
at MailIndexer.IndexSearcherEx.reOpenDB(IndexSearcherEx.java:102)
Please correct me, if i am wrong.
Regards
Ganesh
Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]