[ https://issues.apache.org/jira/browse/LUCENE-6213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299376#comment-14299376 ]
Robert Muir commented on LUCENE-6213: ------------------------------------- One way to fix this would be, to have an TooOldCodec that throws IndexFormatTooOldException for every method. We could register it in SPI with the names of codecs we no longer support. So in trunk, it would be registered for all the 4.x codecs for example. When SegmentInfos asks the codec for the segmentInfoWriter() when decoding the commit, the user will get the correct exception. Alternatively we could just have a hardcoded list/map and conditional logic in SegmentInfos for this. > Add test for IndexFormatTooOldException if a commit has a 3.x segment > --------------------------------------------------------------------- > > Key: LUCENE-6213 > URL: https://issues.apache.org/jira/browse/LUCENE-6213 > Project: Lucene - Core > Issue Type: Bug > Reporter: Robert Muir > > We should add a 4.x index (4.x commit) with some 3.x segment(s) to our > backwards tests. > I don't think we throw IndexFormatTooOldException correctly in this case. I > think instead the user will get a confusing SPI error about a missing codec > "Lucene3x". -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org