xia0c created LUCENE-9011:
-----------------------------

             Summary: Updating breaks backward compatibility by throwing 
IndexFormatTooOldException in some cases
                 Key: LUCENE-9011
                 URL: https://issues.apache.org/jira/browse/LUCENE-9011
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/FSTs
    Affects Versions: 7.7.1
            Reporter: xia0c


When I try to update Lucene from 7.7.1 to the latest version 8.2.0. The 
following code:


{code:java}
@Test
public void test() throws FileSystemException{
    String fstFileName = "fst/slovaklemma_ascii.fst";
    File fstFile = new File(fstFileName);
    FST<CharsRef> fst = FST.read(fstFile.toPath(), 
CharSequenceOutputs.getSingleton());
}
{code}

Throws an IndexFormatTooOldException error:

{code:java}
org.apache.lucene.index.IndexFormatTooOldException: Format version is not 
supported (resource org.apache.lucene.store.InputStreamDataInput@69d9c55): 4 
(needs to be between 6 and 6). This version of Lucene only supports indexes 
created with release 6.0 and later.
        at 
org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:213)
        at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:198)
        at org.apache.lucene.util.fst.FST.<init>(FST.java:275)
        at org.apache.lucene.util.fst.FST.<init>(FST.java:263)
        at org.apache.lucene.util.fst.FST.read(FST.java:487)
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to