Skip to content

Commit 98234a0

Browse files
committed
Renaming
1 parent c786d14 commit 98234a0

File tree

16 files changed

+49
-182
lines changed

16 files changed

+49
-182
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/TSDBDocValuesMergeBenchmark.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.apache.lucene.util.BytesRef;
2727
import org.elasticsearch.cluster.metadata.DataStream;
2828
import org.elasticsearch.common.logging.LogConfigurator;
29-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
29+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
3030
import org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat;
3131
import org.openjdk.jmh.annotations.Benchmark;
3232
import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -259,7 +259,7 @@ private static IndexWriterConfig createIndexWriterConfig(boolean optimizedMergeE
259259
config.setLeafSorter(DataStream.TIMESERIES_LEAF_READERS_SORTER);
260260
config.setMergePolicy(new LogByteSizeMergePolicy());
261261
var docValuesFormat = new ES819TSDBDocValuesFormat(4096, optimizedMergeEnabled);
262-
config.setCodec(new Elasticsearch900Lucene101Codec() {
262+
config.setCodec(new Elasticsearch910Lucene102Codec() {
263263

264264
@Override
265265
public DocValuesFormat getDocValuesFormatForField(String field) {

server/src/main/java/module-info.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
11+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsFormat;
1012
import org.elasticsearch.plugins.internal.RestExtension;
1113
import org.elasticsearch.reservedstate.ReservedStateHandlerProvider;
1214

@@ -456,15 +458,14 @@
456458
org.elasticsearch.index.codec.vectors.es816.ES816HnswBinaryQuantizedVectorsFormat,
457459
org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat,
458460
org.elasticsearch.index.codec.vectors.es818.ES818HnswBinaryQuantizedVectorsFormat,
459-
org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsFormat,
461+
ES910HnswVectorsFormat,
460462
org.elasticsearch.index.codec.vectors.IVFVectorsFormat;
461463

462464
provides org.apache.lucene.codecs.Codec
463465
with
464466
org.elasticsearch.index.codec.Elasticsearch814Codec,
465467
org.elasticsearch.index.codec.Elasticsearch816Codec,
466468
org.elasticsearch.index.codec.Elasticsearch900Codec,
467-
org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec,
468469
org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
469470

470471
provides org.apache.logging.log4j.core.util.ContextDataProvider with org.elasticsearch.common.logging.DynamicContextDataProvider;

server/src/main/java/org/elasticsearch/index/codec/Elasticsearch900Codec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import org.apache.lucene.codecs.PostingsFormat;
1717
import org.apache.lucene.codecs.StoredFieldsFormat;
1818
import org.apache.lucene.codecs.lucene90.Lucene90DocValuesFormat;
19-
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat;
2019
import org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat;
2120
import org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat;
2221
import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
22+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsFormat;
2323
import org.elasticsearch.index.codec.zstd.Zstd814StoredFieldsFormat;
2424

2525
/**
@@ -68,7 +68,7 @@ public Elasticsearch900Codec(Zstd814StoredFieldsFormat.Mode mode) {
6868
this.storedFieldsFormat = mode.getFormat();
6969
this.defaultPostingsFormat = new Lucene912PostingsFormat();
7070
this.defaultDVFormat = new Lucene90DocValuesFormat();
71-
this.defaultKnnVectorsFormat = new Lucene99HnswVectorsFormat();
71+
this.defaultKnnVectorsFormat = new ES910HnswVectorsFormat();
7272
}
7373

7474
@Override

server/src/main/java/org/elasticsearch/index/codec/Elasticsearch900Lucene101Codec.java

Lines changed: 0 additions & 133 deletions
This file was deleted.

server/src/main/java/org/elasticsearch/index/codec/Elasticsearch910Lucene102Codec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat;
2020
import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
2121
import org.elasticsearch.index.codec.perfield.XPerFieldDocValuesFormat;
22-
import org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsFormat;
22+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsFormat;
2323
import org.elasticsearch.index.codec.zstd.Zstd814StoredFieldsFormat;
2424

2525
/**
@@ -66,11 +66,11 @@ public Elasticsearch910Lucene102Codec() {
6666
* worse space-efficiency or vice-versa.
6767
*/
6868
public Elasticsearch910Lucene102Codec(Zstd814StoredFieldsFormat.Mode mode) {
69-
super("Elasticsearch910Lucene102", new Lucene101Codec());
69+
super("Elasticsearch900Lucene101", new Lucene101Codec());
7070
this.storedFieldsFormat = mode.getFormat();
7171
this.defaultPostingsFormat = DEFAULT_POSTINGS_FORMAT;
7272
this.defaultDVFormat = new Lucene90DocValuesFormat();
73-
this.defaultKnnVectorsFormat = new ES910HnswReducedHeapVectorsFormat();
73+
this.defaultKnnVectorsFormat = new ES910HnswVectorsFormat();
7474
}
7575

7676
@Override

server/src/main/java/org/elasticsearch/index/codec/PerFieldFormatSupplier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
import org.apache.lucene.codecs.KnnVectorsFormat;
1414
import org.apache.lucene.codecs.PostingsFormat;
1515
import org.apache.lucene.codecs.lucene90.Lucene90DocValuesFormat;
16-
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat;
1716
import org.elasticsearch.common.util.BigArrays;
1817
import org.elasticsearch.index.IndexMode;
1918
import org.elasticsearch.index.IndexSettings;
2019
import org.elasticsearch.index.IndexVersions;
2120
import org.elasticsearch.index.codec.bloomfilter.ES87BloomFilterPostingsFormat;
2221
import org.elasticsearch.index.codec.postings.ES812PostingsFormat;
2322
import org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat;
23+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsFormat;
2424
import org.elasticsearch.index.mapper.CompletionFieldMapper;
2525
import org.elasticsearch.index.mapper.IdFieldMapper;
2626
import org.elasticsearch.index.mapper.Mapper;
@@ -34,7 +34,7 @@
3434
public class PerFieldFormatSupplier {
3535

3636
private static final DocValuesFormat docValuesFormat = new Lucene90DocValuesFormat();
37-
private static final KnnVectorsFormat knnVectorsFormat = new Lucene99HnswVectorsFormat();
37+
private static final KnnVectorsFormat knnVectorsFormat = new ES910HnswVectorsFormat();
3838
private static final ES819TSDBDocValuesFormat tsdbDocValuesFormat = new ES819TSDBDocValuesFormat();
3939
private static final ES812PostingsFormat es812PostingsFormat = new ES812PostingsFormat();
4040
private static final PostingsFormat completionPostingsFormat = PostingsFormat.forName("Completion101");

server/src/main/java/org/elasticsearch/index/codec/vectors/ES814HnswScalarQuantizedVectorsFormat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsReader;
1717
import org.apache.lucene.index.SegmentReadState;
1818
import org.apache.lucene.index.SegmentWriteState;
19-
import org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsWriter;
19+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsWriter;
2020

2121
import java.io.IOException;
2222

@@ -61,7 +61,7 @@ public ES814HnswScalarQuantizedVectorsFormat(int maxConn, int beamWidth, Float c
6161

6262
@Override
6363
public KnnVectorsWriter fieldsWriter(SegmentWriteState state) throws IOException {
64-
return new ES910HnswReducedHeapVectorsWriter(state, maxConn, beamWidth, flatVectorsFormat.fieldsWriter(state), 1, null);
64+
return new ES910HnswVectorsWriter(state, maxConn, beamWidth, flatVectorsFormat.fieldsWriter(state), 1, null);
6565
}
6666

6767
@Override

server/src/main/java/org/elasticsearch/index/codec/vectors/ES815HnswBitVectorsFormat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsReader;
1717
import org.apache.lucene.index.SegmentReadState;
1818
import org.apache.lucene.index.SegmentWriteState;
19-
import org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsWriter;
19+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsWriter;
2020

2121
import java.io.IOException;
2222

@@ -56,7 +56,7 @@ public ES815HnswBitVectorsFormat(int maxConn, int beamWidth) {
5656

5757
@Override
5858
public KnnVectorsWriter fieldsWriter(SegmentWriteState state) throws IOException {
59-
return new ES910HnswReducedHeapVectorsWriter(state, maxConn, beamWidth, flatVectorsFormat.fieldsWriter(state), 1, null);
59+
return new ES910HnswVectorsWriter(state, maxConn, beamWidth, flatVectorsFormat.fieldsWriter(state), 1, null);
6060
}
6161

6262
@Override

server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818HnswBinaryQuantizedVectorsFormat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.apache.lucene.index.SegmentWriteState;
3030
import org.apache.lucene.search.TaskExecutor;
3131
import org.apache.lucene.util.hnsw.HnswGraph;
32-
import org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsWriter;
32+
import org.elasticsearch.index.codec.vectors.es910.ES910HnswVectorsWriter;
3333

3434
import java.io.IOException;
3535
import java.util.concurrent.ExecutorService;
@@ -119,7 +119,7 @@ public ES818HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, int num
119119

120120
@Override
121121
public KnnVectorsWriter fieldsWriter(SegmentWriteState state) throws IOException {
122-
return new ES910HnswReducedHeapVectorsWriter(
122+
return new ES910HnswVectorsWriter(
123123
state,
124124
maxConn,
125125
beamWidth,
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/**
4848
* Copied from Lucene, replace with Lucene's implementation sometime after Lucene 10.3.0
4949
*/
50-
public class ES910HnswReducedHeapVectorsFormat extends KnnVectorsFormat {
50+
public class ES910HnswVectorsFormat extends KnnVectorsFormat {
5151

5252
static final String NAME = "ES910HnswReducedHeapVectorsFormat";
5353

@@ -79,7 +79,7 @@ public class ES910HnswReducedHeapVectorsFormat extends KnnVectorsFormat {
7979
private final TaskExecutor mergeExec;
8080

8181
/** Constructs a format using default graph construction parameters */
82-
public ES910HnswReducedHeapVectorsFormat() {
82+
public ES910HnswVectorsFormat() {
8383
this(DEFAULT_MAX_CONN, DEFAULT_BEAM_WIDTH, DEFAULT_NUM_MERGE_WORKER, null);
8484
}
8585

@@ -89,7 +89,7 @@ public ES910HnswReducedHeapVectorsFormat() {
8989
* @param maxConn the maximum number of connections to a node in the HNSW graph
9090
* @param beamWidth the size of the queue maintained during graph construction.
9191
*/
92-
public ES910HnswReducedHeapVectorsFormat(int maxConn, int beamWidth) {
92+
public ES910HnswVectorsFormat(int maxConn, int beamWidth) {
9393
this(maxConn, beamWidth, DEFAULT_NUM_MERGE_WORKER, null);
9494
}
9595

@@ -104,8 +104,8 @@ public ES910HnswReducedHeapVectorsFormat(int maxConn, int beamWidth) {
104104
* generated by this format to do the merge. If null, the configured {@link
105105
* MergeScheduler#getIntraMergeExecutor(MergePolicy.OneMerge)} is used.
106106
*/
107-
public ES910HnswReducedHeapVectorsFormat(int maxConn, int beamWidth, int numMergeWorkers, ExecutorService mergeExec) {
108-
super(ES910HnswReducedHeapVectorsFormat.NAME);
107+
public ES910HnswVectorsFormat(int maxConn, int beamWidth, int numMergeWorkers, ExecutorService mergeExec) {
108+
super(ES910HnswVectorsFormat.NAME);
109109
if (maxConn <= 0 || maxConn > MAXIMUM_MAX_CONN) {
110110
throw new IllegalArgumentException(
111111
"maxConn must be positive and less than or equal to " + MAXIMUM_MAX_CONN + "; maxConn=" + maxConn
@@ -131,7 +131,7 @@ public ES910HnswReducedHeapVectorsFormat(int maxConn, int beamWidth, int numMerg
131131

132132
@Override
133133
public KnnVectorsWriter fieldsWriter(SegmentWriteState state) throws IOException {
134-
return new ES910HnswReducedHeapVectorsWriter(
134+
return new ES910HnswVectorsWriter(
135135
state,
136136
maxConn,
137137
beamWidth,

0 commit comments

Comments
 (0)