Skip to content

Commit acbbb13

Browse files
committed
Change tests to reference the latest codec version
1 parent 402f480 commit acbbb13

File tree

10 files changed

+16
-13
lines changed

10 files changed

+16
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public PerFieldFormatSupplier(MapperService mapperService, BigArrays bigArrays)
5151
if (mapperService != null
5252
&& mapperService.getIndexSettings().getIndexVersionCreated().onOrAfter(IndexVersions.USE_LUCENE101_POSTINGS_FORMAT)
5353
&& mapperService.getIndexSettings().getMode().useDefaultPostingsFormat()) {
54-
defaultPostingsFormat = Elasticsearch900Lucene101Codec.DEFAULT_POSTINGS_FORMAT;
54+
defaultPostingsFormat = Elasticsearch910Lucene102Codec.DEFAULT_POSTINGS_FORMAT;
5555
} else {
5656
// our own posting format using PFOR
5757
defaultPostingsFormat = es812PostingsFormat;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* per index in real time via the mapping API. If no specific postings format or vector format is
2727
* configured for a specific field the default postings or vector format is used.
2828
*/
29-
public final class PerFieldMapperCodec extends Elasticsearch900Lucene101Codec {
29+
public final class PerFieldMapperCodec extends Elasticsearch910Lucene102Codec {
3030

3131
private final PerFieldFormatSupplier formatSupplier;
3232

server/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ org.elasticsearch.index.codec.Elasticsearch814Codec
22
org.elasticsearch.index.codec.Elasticsearch816Codec
33
org.elasticsearch.index.codec.Elasticsearch900Codec
44
org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec
5+
org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec

server/src/test/java/org/elasticsearch/index/codec/CodecTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void testResolveDefaultCodecs() throws Exception {
5050
assumeTrue("Only when zstd_stored_fields feature flag is enabled", CodecService.ZSTD_STORED_FIELDS_FEATURE_FLAG);
5151
CodecService codecService = createCodecService();
5252
assertThat(codecService.codec("default"), instanceOf(PerFieldMapperCodec.class));
53-
assertThat(codecService.codec("default"), instanceOf(Elasticsearch900Lucene101Codec.class));
53+
assertThat(codecService.codec("default"), instanceOf(Elasticsearch910Lucene102Codec.class));
5454
}
5555

5656
public void testDefault() throws Exception {

server/src/test/java/org/elasticsearch/index/codec/tsdb/DocValuesCodecDuelTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.apache.lucene.tests.util.TestUtil;
2828
import org.apache.lucene.util.BytesRef;
2929
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
30+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
3031
import org.elasticsearch.index.codec.tsdb.ES87TSDBDocValuesFormatTests.TestES87TSDBDocValuesFormat;
3132
import org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat;
3233
import org.elasticsearch.test.ESTestCase;
@@ -55,7 +56,7 @@ public void testDuel() throws IOException {
5556
baselineConfig.setCodec(TestUtil.alwaysDocValuesFormat(new Lucene90DocValuesFormat()));
5657
var contenderConf = newIndexWriterConfig();
5758
contenderConf.setMergePolicy(mergePolicy);
58-
Codec codec = new Elasticsearch900Lucene101Codec() {
59+
Codec codec = new Elasticsearch910Lucene102Codec() {
5960

6061
final DocValuesFormat docValuesFormat = randomBoolean()
6162
? new ES819TSDBDocValuesFormat()

server/src/test/java/org/elasticsearch/index/codec/tsdb/ES87TSDBDocValuesFormatTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.apache.lucene.util.BytesRef;
3838
import org.elasticsearch.common.logging.LogConfigurator;
3939
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
40+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
4041

4142
import java.io.IOException;
4243
import java.util.ArrayList;
@@ -74,7 +75,7 @@ public DocValuesConsumer fieldsConsumer(SegmentWriteState state) throws IOExcept
7475
}
7576
}
7677

77-
private final Codec codec = new Elasticsearch900Lucene101Codec() {
78+
private final Codec codec = new Elasticsearch910Lucene102Codec() {
7879

7980
@Override
8081
public DocValuesFormat getDocValuesFormatForField(String field) {

server/src/test/java/org/elasticsearch/index/codec/tsdb/es819/ES819TSDBDocValuesFormatTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
import org.apache.lucene.search.SortedNumericSortField;
2828
import org.apache.lucene.util.BytesRef;
2929
import org.elasticsearch.cluster.metadata.DataStream;
30-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
30+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
3131
import org.elasticsearch.index.codec.tsdb.ES87TSDBDocValuesFormatTests;
3232

3333
import java.util.Arrays;
3434
import java.util.Locale;
3535

3636
public class ES819TSDBDocValuesFormatTests extends ES87TSDBDocValuesFormatTests {
3737

38-
private final Codec codec = new Elasticsearch900Lucene101Codec() {
38+
private final Codec codec = new Elasticsearch910Lucene102Codec() {
3939

4040
final ES819TSDBDocValuesFormat docValuesFormat = new ES819TSDBDocValuesFormat();
4141

server/src/test/java/org/elasticsearch/index/codec/zstd/Zstd814BestCompressionStoredFieldsFormatTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
import org.apache.lucene.codecs.Codec;
1313
import org.apache.lucene.tests.index.BaseStoredFieldsFormatTestCase;
14-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
14+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
1515

1616
public class Zstd814BestCompressionStoredFieldsFormatTests extends BaseStoredFieldsFormatTestCase {
1717

18-
private final Codec codec = new Elasticsearch900Lucene101Codec(Zstd814StoredFieldsFormat.Mode.BEST_COMPRESSION);
18+
private final Codec codec = new Elasticsearch910Lucene102Codec(Zstd814StoredFieldsFormat.Mode.BEST_COMPRESSION);
1919

2020
@Override
2121
protected Codec getCodec() {

server/src/test/java/org/elasticsearch/index/codec/zstd/Zstd814BestSpeedStoredFieldsFormatTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
import org.apache.lucene.codecs.Codec;
1313
import org.apache.lucene.tests.index.BaseStoredFieldsFormatTestCase;
14-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
14+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
1515

1616
public class Zstd814BestSpeedStoredFieldsFormatTests extends BaseStoredFieldsFormatTestCase {
1717

18-
private final Codec codec = new Elasticsearch900Lucene101Codec(Zstd814StoredFieldsFormat.Mode.BEST_SPEED);
18+
private final Codec codec = new Elasticsearch910Lucene102Codec(Zstd814StoredFieldsFormat.Mode.BEST_SPEED);
1919

2020
@Override
2121
protected Codec getCodec() {

server/src/test/java/org/elasticsearch/search/vectors/RescoreKnnVectorQueryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.apache.lucene.search.TopDocs;
3030
import org.apache.lucene.search.Weight;
3131
import org.apache.lucene.store.Directory;
32-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
32+
import org.elasticsearch.index.codec.Elasticsearch910Lucene102Codec;
3333
import org.elasticsearch.index.codec.vectors.ES813Int8FlatVectorFormat;
3434
import org.elasticsearch.index.codec.vectors.ES814HnswScalarQuantizedVectorsFormat;
3535
import org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat;
@@ -211,7 +211,7 @@ private static void addRandomDocuments(int numDocs, Directory d, int numDims) th
211211
new ES813Int8FlatVectorFormat(),
212212
new ES814HnswScalarQuantizedVectorsFormat()
213213
);
214-
iwc.setCodec(new Elasticsearch900Lucene101Codec(randomFrom(Zstd814StoredFieldsFormat.Mode.values())) {
214+
iwc.setCodec(new Elasticsearch910Lucene102Codec(randomFrom(Zstd814StoredFieldsFormat.Mode.values())) {
215215
@Override
216216
public KnnVectorsFormat getKnnVectorsFormatForField(String field) {
217217
return format;

0 commit comments

Comments
 (0)