Hello,
Today even after all documents in an index are deleted via an API call,
reindexing still doesn't change the "indexCreatedVersionMajor" property
value in SegmentInfos. Hence even after complete reindexing, an upgrade
path X--> X+1 --> X+2 is still not possible as we end up with an
IndexFormatTooOldException.

Requesting an API (on IndexWriter?) which can reset this property (upon a
new commit) to the current Lucene version if:
1) No more live docs present
OR
2) If all SegmentInfo in the index have a "minVersion" AND "version" stamp
of the latest version , but SegmentInfos has an older
"indexCreatedVersionMajor".

This will help users a LOT since they can now interact with the index
purely via API without needing manual deletion and also help open up a
legitimate path to upgrade when an index doesn't HAVE to be repopulated
from the source.

If there is agreement, I am happy to pick this up and submit a PR.

Thanks,
Rahul Goswami

Reply via email to