lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <>
Subject problem with IndexReader.reopen()
Date Wed, 11 Feb 2009 02:27:47 GMT

  Hi !

I just upgraded from Lucene 2.3.2 to Lucene 2.4.0.
I've been using IndexReader.reopen() with 2.3.2 just fine for a long time 

With 2.4.0, reopening the same index (hence, a 2.3.2 index), I'm getting 
spurious AlreadyClosedExceptions thrown from inside reopen():

  "trace": " this Directory is closed
 	at org.apache.lucene.index.SegmentInfos$
 	at org.apache.lucene.index.SegmentInfos.readCurrentVersion(
 	at org.apache.lucene.index.DirectoryIndexReader.isCurrent(
 	at org.apache.lucene.index.DirectoryIndexReader.reopen(

Is the javadoc about this method still correct ? That is, do I need to close
the old reader instance manually after reopen() returned a new instance as
is stated there ?
This is what I was doing in 2.3.2 (and am still doing in 2.4.0).

If I remove the close() call I don't get the error anymore but won't that 
leak ? Or is the javadoc for IndexReader.reopen() just wrong ?


ps: that javadoc uses a variable called 'new'. Isn't that a java keyword ?

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

View raw message