Hi Dmitry, These codecs are indeed not backward compatible. Only the default codec is guaranteed to be backward compatible.
If you would like to bring your index to a snapshot of the main branch, one option would be to: 1. Use Lucene 8.5's IndexWriter#addIndexes in order to create a copy of your index that uses the default codec. 2. Upgrade to a main snapshot. 3. Use main's IndexWriter#addIndexes in order to go back to a custom codec that uses FST50 or UniformSplit on some fields. Please also note that we don't guarantee backward compatibility of indices created by Lucene snapshots, ie. an index created by a snapshot of Lucene 9.0 might not be readable by Lucene 9.0, so you will have to do the same operation again when moving to Lucene 9.0. On Sun, Apr 18, 2021 at 4:50 PM Dmitry Emets <emet...@gmail.com> wrote: > Hi! > I cannot open by lucene master my indexes created by lucene 8.5. I get an > error > Exception in thread "main" org.apache.lucene.index.CorruptIndexException: > codec mismatch: actual codec=Lucene84PostingsWriterDoc vs expected > codec=Lucene90PostingsWriterDoc > (resource=MMapIndexInput(path="C:\data\lucene\_1i8ye_FST50_0.doc")) > at > org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:204) > at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:193) > at org.apache.lucene.codecs.CodecUtil.checkIndexHeader(CodecUtil.java:253) > at > > org.apache.lucene.codecs.lucene90.Lucene90PostingsReader.<init>(Lucene90PostingsReader.java:84) > at > > org.apache.lucene.codecs.memory.FSTPostingsFormat.fieldsProducer(FSTPostingsFormat.java:60) > ... > Files with UniformSplit has the same error. Are these codecs not backward > compatible? Is there any workaround? > Thank you! > -- Adrien