uschindler commented on issue #13797: URL: https://github.com/apache/lucene/issues/13797#issuecomment-3182682817
Basically by that IndexWriterConfig method you have everything that's needed to rewrite your index to a newer version (using IndexUpgrader and IndexUpgraderMergePolicy). That tool exists since long time: https://lucene.apache.org/core/10_2_2/core/org/apache/lucene/index/IndexUpgrader.html The only problem is that the "index created" version is coded into the index metadata (segments file). By using the DirectoryReader#open Method @ https://lucene.apache.org/core/10_2_2/core/org/apache/lucene/index/DirectoryReader.html#open(org.apache.lucene.index.IndexCommit,int,java.util.Comparator) you can then trick reader to open the index originally created with a too-low version. I still think the best would be to all in the IndexUpgrader tool to "modify" the index created version (on special request) loosing semantic interoperability. That's easy by opening the DirectoryReader (like seen above) and then use something like `IndexWriter#addIndexes(directoryReader.leaves())` to rewrite the index and also preserving original segment structure. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org