I'm using Lucene 2.4.1 and I'm still getting an AlreadyClosedException when 
trying to reopen an IndexReader.  Here's the code I'm using, in case I'm doing 
something wrong, there isn't an error if I don't close the old reader:
String indexPath = "C:\\Lucene\\test";
IndexReader reader = IndexReader.open(indexPath);
...
IndexReader tempReader;
try {
tempReader = reader.reopen();
if(tempReader != reader){
System.out.println("reader reopened");
reader.close();
}else{
System.out.println("reader has not changed");
}
reader = tempReader;
return this;
} catch (CorruptIndexException e) { 
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Sincerely,
Chris Salem 

Reply via email to