rahulgoswami opened a new pull request, #14607:
URL: https://github.com/apache/lucene/pull/14607

   ### Description
   
   This PR is created after discussing the idea on the lucene dev list.
   
   https://lists.apache.org/thread/gk3kwplon73llz356szz1mn3myn3nnm3
   
   The revised proposal **[Approach 2]** 
(https://github.com/apache/lucene/pull/14607#issuecomment-3264544357) keeps the 
SegmentInfos.indexCreatedVersionMajor untouched. Instead the proposal is to 
introduce a new property currentIndexMajorVersion which can be updated as 
appropriate to facilitate index back compatibility.
   
   Update (09/19/2025): There is also an **[Approach 3]** presented in 
https://github.com/apache/lucene/pull/14607#issuecomment-3310474509
   
   **Update (09/23/2025) - Summary:**
   
   **Problem statement**
   If all the segments have minVersion and version >= MIN_SUPPORTED_MAJOR , 
please allow the user to work with the index irrespective of when the index was 
originally created (i.e. even if 
SegmentInfos.indexCreatedVersionMajor<MIN_SUPPORTED_MAJOR)
   
   **Example scenario**
   User creates an index on Lucene 10 (also, MIN_SUPPORTED_MAJOR=10). Say it 
stays the same until Lucene 13. In Lucene 13 there is a change which requires 
reindexing. This means that when Lucene 14 releases, MIN_SUPPORTED_MAJOR moves 
up to 13.  
   However, while on Lucene 13 if user is able to reindex in a way that at the 
end of the process, for each segment, version=minVersion=13 (refer 
https://github.com/apache/lucene/pull/14607#issuecomment-3325749486 for how 
this can be achieved outside of Lucene), then upon moving to Lucene 14, this 
index should be readable even though index was originally created on 10.
   
   **For more context**
   https://github.com/apache/lucene/pull/14607#issuecomment-3325749486
   https://github.com/apache/lucene/pull/14607#issuecomment-3264544357
   
   **Proposed approaches**
   (All approaches assume the prerequisite that all segments of the index have 
been converted outside of Lucene to have version=minVersion=LATEST )
   
   **[Approach 1]** Rewrite SegmentInfos.indexCreatedVersionMajor to LATEST 
upon commit. (PR implementation as of 09/23/2025)
   
   **[[Approach 
2]](https://github.com/apache/lucene/pull/14607#issuecomment-3264544357)** Keep 
indexCreatedVersionMajor untouched. Introduce a mutable parallel property in 
SegmentInfos (say "currentIndexMajorVersion") and use this for deciding whether 
an index should be opened. 
   
   **[[Approach 
3]](https://github.com/apache/lucene/pull/14607#issuecomment-3310474509)** Look 
at the list of SegmentInfo (instead of indexCreatedVersionMajor) at read time 
to determine compatibility.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to