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.
This commit is contained in:
Julie Tibshirani 2021-02-11 09:11:47 -08:00 committed by GitHub
parent 0cbb38ff4a
commit 096f054d56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -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;