Skip to content

Apache Lucene open-source search software

Rename SegmentInfos.VERSION_11_0 to VERSION_10_6

Jim Ferencziea248114ac4e
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index f07a8fe4cbf..3108ae5c72c 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -123,11 +123,6 @@ API Changes
New Features
---------------------
-* GITHUB#16418: Incremental doc-values updates. A set-only doc-values update (NUMERIC or BINARY) is written as a sparse
- "delta" overlay holding just the updated documents and layered over the base column at read time, instead of
- rewriting the whole column, turning per-update write amplification from O(column) into O(updated docs). Enabled by
- default; disable with IndexWriterConfig#setMaxDocValuesOverlays(0). (Jim Ferenczi)
-
* GITHUB#16241: Add HangulCompositionCharFilter to analysis-nori for opt-in composition of
modern Hangul conjoining jamo before KoreanTokenizer. (Mingi Jeong)
@@ -223,9 +218,6 @@ Bug Fixes
merge-reuse generations, preventing progressive recall loss under low delete
rates. (Ethan Baker)
-* GITHUB#16565: IndexWriter#updateBinaryDocValue now rejects updating a field that is part of the
- index sort, matching IndexWriter#updateNumericDocValue. (Jim Ferenczi)
-
* GITHUB#14049: Randomize KNN codec params in RandomCodec. Fixes scalar quantization div-by-zero
when all values are identical. (Mike Sokolov)
@@ -377,6 +369,11 @@ API Changes
New Features
---------------------
+* GITHUB#16418: Incremental doc-values updates. A set-only doc-values update (NUMERIC or BINARY) is written as a sparse
+ "delta" overlay holding just the updated documents and layered over the base column at read time, instead of
+ rewriting the whole column, turning per-update write amplification from O(column) into O(updated docs). Enabled by
+ default; disable with IndexWriterConfig#setMaxDocValuesOverlays(0). (Jim Ferenczi)
+
* GITHUB#16243: Add StableTflSimilarity, a similarity that estimates term rarity from term length
and document length instead of corpus statistics such as document frequency. It also supports k3
query-term frequency saturation. (Tianxiao Wei)
@@ -483,6 +480,9 @@ Optimizations
Bug Fixes
---------------------
+* GITHUB#16565: IndexWriter#updateBinaryDocValue now rejects updating a field that is part of the
+ index sort, matching IndexWriter#updateNumericDocValue. (Jim Ferenczi)
+
* GITHUB#16546: Prevent RangeBulkScorer from passing empty ranges to LeafCollector. (jxy)
* GITHUB#16450: Fix DocValuesRangeIterator.docIDRunEnd() returning incorrect run boundaries,
diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java b/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
index a9009952ce5..fc4d809c73f 100644
--- a/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
+++ b/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
@@ -127,9 +127,9 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
public static final int VERSION_86 = 10;
/** The version that records per-field incremental doc-values overlay generations. */
- public static final int VERSION_11_0 = 11;
+ public static final int VERSION_10_6 = 11;
- static final int VERSION_CURRENT = VERSION_11_0;
+ static final int VERSION_CURRENT = VERSION_10_6;
/** Name of the generation reference file name */
static final String OLD_SEGMENTS_GEN = "segments.gen";
@@ -460,7 +460,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
dvUpdateFiles = Collections.unmodifiableMap(map);
}
siPerCommit.setDocValuesUpdatesFiles(dvUpdateFiles);
- if (format >= VERSION_11_0) {
+ if (format >= VERSION_10_6) {
final int numOverlayFields = CodecUtil.readBEInt(input);
for (int i = 0; i < numOverlayFields; i++) {
final int fieldNumber = CodecUtil.readBEInt(input);
@@ -718,7 +718,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
CodecUtil.writeBEInt(out, e.getKey());
out.writeSetOfStrings(e.getValue());
}
- // Doc-values overlays, part of the format since VERSION_11_0 (which VERSION_CURRENT always
+ // Doc-values overlays, part of the format since VERSION_10_6 (which VERSION_CURRENT always
// is).
// field -> {baseGen, deltaGenNewestFirst...}; empty for segments without overlays.
final Map<Integer, long[]> overlays = siPerCommit.getDocValuesOverlays();
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIncrementalDocValuesUpdates.java b/lucene/core/src/test/org/apache/lucene/index/TestIncrementalDocValuesUpdates.java
index 5b2be5e6c29..de5fa719dc6 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIncrementalDocValuesUpdates.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIncrementalDocValuesUpdates.java
@@ -456,7 +456,7 @@ public class TestIncrementalDocValuesUpdates extends LuceneTestCase {
w.updateNumericDocValue(new Term("id", "0"), "val", 2L); // writes a sparse overlay generation
w.commit();
}
- // The commit records overlay generations, so its segments file is written at VERSION_11_0; a
+ // The commit records overlay generations, so its segments file is written at VERSION_10_6; a
// reader that only understands up to VERSION_86 rejects it with IndexFormatTooNewException.
assertOldReaderRejects(dir);
// And the current reader sees the overlay round-tripped through the segments file.
diff --git a/lucene/luke/src/java/org/apache/lucene/luke/models/util/IndexUtils.java b/lucene/luke/src/java/org/apache/lucene/luke/models/util/IndexUtils.java
index 86bd45a07fe..f22ec007391 100644
--- a/lucene/luke/src/java/org/apache/lucene/luke/models/util/IndexUtils.java
+++ b/lucene/luke/src/java/org/apache/lucene/luke/models/util/IndexUtils.java
@@ -350,10 +350,10 @@ public final class IndexUtils {
format = "Lucene 7.4 or later";
} else if (actualVersion == SegmentInfos.VERSION_86) {
format = "Lucene 8.6 or later";
- } else if (actualVersion == SegmentInfos.VERSION_11_0) {
- format = "Lucene 11.0 or later";
- } else if (actualVersion > SegmentInfos.VERSION_11_0) {
- format = "Lucene 11.0 or later (UNSUPPORTED)";
+ } else if (actualVersion == SegmentInfos.VERSION_10_6) {
+ format = "Lucene 10.6 or later";
+ } else if (actualVersion > SegmentInfos.VERSION_10_6) {
+ format = "Lucene 10.6 or later (UNSUPPORTED)";
}
} else {
format = "Lucene 6.x or prior (UNSUPPORTED)";
diff --git a/lucene/luke/src/test/org/apache/lucene/luke/models/overview/TestOverviewImpl.java b/lucene/luke/src/test/org/apache/lucene/luke/models/overview/TestOverviewImpl.java
index 24b0a065088..4ee0f4b9769 100644
--- a/lucene/luke/src/test/org/apache/lucene/luke/models/overview/TestOverviewImpl.java
+++ b/lucene/luke/src/test/org/apache/lucene/luke/models/overview/TestOverviewImpl.java
@@ -73,7 +73,7 @@ public class TestOverviewImpl extends OverviewTestBase {
public void testGetIndexFormat() {
OverviewImpl overview = new OverviewImpl(reader, indexDir.toString());
- assertEquals("Lucene 11.0 or later", overview.getIndexFormat().get());
+ assertEquals("Lucene 10.6 or later", overview.getIndexFormat().get());
}
public void testGetDirImpl() {