"you need to forcefully get a new reader which you can make changes to, such
that it does not affect the original reader"
exactly. I was thinking reopen(boolean forceNew) given people probably
expect to use reopen for this behavior, and may not think to look at clone.
Currently the reopen seems t
My guess is your newIndexReader is in fact the same as your
previousIndexReader, in which case getting the same gen in your
LOG.info is expected.
It seems like what you want is a way to force a new reader to be
returned by reopen() even if there were no changes to the index. Ie,
you ne
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 = previousInde