From 096f054d562978a768d346f66b50332c686919a0 Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Thu, 11 Feb 2021 09:11:47 -0800 Subject: [PATCH] LUCENE-9705: Reset internal version in Lucene90FieldInfosFormat. (#2339) Since this is a fresh format, we can remove older version logic and reset the internal version to 0. --- .../lucene/codecs/lucene90/Lucene90FieldInfosFormat.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90FieldInfosFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90FieldInfosFormat.java index 30507598a49..43f421574a7 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90FieldInfosFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90FieldInfosFormat.java @@ -168,9 +168,7 @@ public final class Lucene90FieldInfosFormat extends FieldInfosFormat { int pointNumBytes; int pointIndexDimensionCount = pointDataDimensionCount; if (pointDataDimensionCount != 0) { - if (version >= Lucene90FieldInfosFormat.FORMAT_SELECTIVE_INDEXING) { - pointIndexDimensionCount = input.readVInt(); - } + pointIndexDimensionCount = input.readVInt(); pointNumBytes = input.readVInt(); } else { pointNumBytes = 0; @@ -363,9 +361,7 @@ public final class Lucene90FieldInfosFormat extends FieldInfosFormat { // Codec header static final String CODEC_NAME = "Lucene90FieldInfos"; static final int FORMAT_START = 0; - static final int FORMAT_SOFT_DELETES = 1; - static final int FORMAT_SELECTIVE_INDEXING = 2; - static final int FORMAT_CURRENT = FORMAT_SELECTIVE_INDEXING; + static final int FORMAT_CURRENT = FORMAT_START; // Field flags static final byte STORE_TERMVECTOR = 0x1;