rahulgoswami commented on PR #14607: URL: https://github.com/apache/lucene/pull/14607#issuecomment-3264544357
An index where all segments have minVersion=LATEST and version=LATEST is essentially an index with version LATEST. Please note that this API does NOT require Lucene to perform the upgrade/reindexing part. That will be done by the upper layer (Solr, Elasticsearch, etc) , say, through a custom merge policy. The requirement from the API is "If all the segments have minVersion=version=Version.LATEST, please let the index reflect that it is Version.LATEST in all respects" If the concern is to maintain tracking data regarding the origins of the index, indexCreatedVersionMajor could be left untouched. Instead a new property "currentIndexMajorVersion" could be introduced which sits parallel to indexCreatedVersionMajor. For a fresh index, currentIndexMajorVersion=indexCreatedVersionMajor=Version.LATEST Upon an upgrade, if the upper layer (Solr, Elasticsearch, etc) successfully converts all segments to Version.LATEST, calling the IndexWriter.commitAndUpdateVersionCreatedMajor() (which will now be called commitAndUpdateCurrentMajorVersion() ) should set currentIndexMajorVersion=Version.LATEST, while indexCreatedVersionMajor remains untouched. SegmentInfos.readCommit() now relies on currentIndexMajorVersion for codec compatibility check. @jpountz would appreciate your thoughts on this too please. -- 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]
