You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2026/04/22 16:04:43 UTC
(lucene) branch main updated: Use explicit version check in Lucene90BlockTreeTermsWriter (#15975)
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 6b3a452900f Use explicit version check in Lucene90BlockTreeTermsWriter (#15975)
6b3a452900f is described below
commit 6b3a452900f18936fd056f8a411f2fcbafaf9c17
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Wed Apr 22 17:04:37 2026 +0100
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.
---
.../lucene90/blocktree/Lucene90BlockTreeTermsWriter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java
index 0c463dd2cd5..a7dda207648 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java
@@ -533,8 +533,8 @@ public final class Lucene90BlockTreeTermsWriter extends FieldsConsumer {
final ByteSequenceOutputs outputs = ByteSequenceOutputs.getSingleton();
final int fstVersion;
- if (version >= Lucene90BlockTreeTermsReader.VERSION_CURRENT) {
- fstVersion = FST.VERSION_CURRENT;
+ if (version >= Lucene90BlockTreeTermsReader.VERSION_FST_CONTINUOUS_ARCS) {
+ fstVersion = FST.VERSION_CONTINUOUS_ARCS;
} else {
fstVersion = FST.VERSION_90;
}