lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rutherglen" <>
Subject IndexReader.reopen issue
Date Mon, 23 Jun 2008 14:19:18 GMT
When this code is run, why are the generation numbers the same?  The desired
behavior is that the delete happens only to the newIndexReader, leaving the
previousIndexReader unaffected.

IndexReader previousIndexReader = latestIndexSnapshot.getIndexReader();
IndexReader newIndexReader = previousIndexReader.reopen(); // returns the
same reader?
newIndexReader = newIndexReader.reopen();"previous reader gen:
"+previousIndexReader.getIndexCommit().getGeneration()+" newIndexReader gen:

View raw message