Hello, Would appreciate any insights on the issue.Are there any backward incompatible changes in 8.x index because of which the lucene upgrader is unable to upgrade any index EVER touched by <= 6.x ? Or is the restriction more of a safety net at this point for possible future incompatibilities ?
Thanks, Rahul On Thu, Jan 6, 2022 at 11:46 PM Rahul Goswami <rahul196...@gmail.com> wrote: > Hello, > I am using Apache Solr 7.7.2 with indexes which were originally created on > 4.8 and upgraded ever since. I recently tried upgrading to 8.x using the > lucene IndexUpgrader tool and the upgrade fails. I know that lucene 8.x > prevents opening any segment which was touched by <= 6.x at any point in > the past. I also know the general recommendation is to reindex upon > migration to another major release, however it is not always feasible. > > So I tried to remove the check for LATEST-1 in SegmentInfos.java ( > https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.11.1/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java#L321) > and also checked for other references to IndexFormatTooOldException. Turns > out that removing this check and rebuilding lucene-core lets the upgrade go > through fine. I ran a full sequence of index upgrades from 5.x -> 6.x -> > 7.x ->8.x. which went through fine. Also search/update operations work > without any issues in 8.x. > > I could not find any JIRAs which talk about the technical reason behind > imposing this restriction, and would like to know the nitty-gritties. Also > would like to know about any potential pitfalls that I might be overlooking > with the above hack. > > Thanks, > Rahul > >