Skip to content

Commit 6b3a452

Browse files
authored
Use explicit version check in Lucene90BlockTreeTermsWriter (#15975)
We were checking against VERSION_CURRENT to determine how to load FSTs, which works fine now but could cause problems if VERSION_CURRENT was updated at any point for a different reason.
1 parent d16e255 commit 6b3a452

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ public void compileIndex(
533533

534534
final ByteSequenceOutputs outputs = ByteSequenceOutputs.getSingleton();
535535
final int fstVersion;
536-
if (version >= Lucene90BlockTreeTermsReader.VERSION_CURRENT) {
537-
fstVersion = FST.VERSION_CURRENT;
536+
if (version >= Lucene90BlockTreeTermsReader.VERSION_FST_CONTINUOUS_ARCS) {
537+
fstVersion = FST.VERSION_CONTINUOUS_ARCS;
538538
} else {
539539
fstVersion = FST.VERSION_90;
540540
}

0 commit comments

Comments
 (0)