Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9011

Updating breaks backward compatibility by throwing IndexFormatTooOldException in some cases

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 7.7.1
    • Fix Version/s: None
    • Component/s: core/FSTs
    • Labels:
      None
    • Lucene Fields:
      New

      Description

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

      @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());
      }
      

      Throws an IndexFormatTooOldException error:

      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)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lingchao xia0c
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: