Skip to content

Commit 351ba80

Browse files
committed
rename codec
1 parent 1478c8a commit 351ba80

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
org.elasticsearch.index.codec.Elasticsearch816Codec,
463463
org.elasticsearch.index.codec.Elasticsearch900Codec,
464464
org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec,
465-
org.elasticsearch.index.codec.Elasticsearch902Lucene103Codec;
465+
org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec;
466466

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

server/src/main/java/org/elasticsearch/index/codec/Elasticsearch902Lucene103Codec.java renamed to server/src/main/java/org/elasticsearch/index/codec/Elasticsearch92Lucene103Codec.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,45 @@
2626
* Elasticsearch codec as of 9.2 relying on Lucene 10.3. This extends the Lucene 10.3 codec to compressed
2727
* stored fields with ZSTD instead of LZ4/DEFLATE. See {@link Zstd814StoredFieldsFormat}.
2828
*/
29-
public class Elasticsearch902Lucene103Codec extends CodecService.DeduplicateFieldInfosCodec {
29+
public class Elasticsearch92Lucene103Codec extends CodecService.DeduplicateFieldInfosCodec {
3030

3131
private final StoredFieldsFormat storedFieldsFormat;
3232

3333
private final PostingsFormat defaultPostingsFormat;
3434
private final PostingsFormat postingsFormat = new PerFieldPostingsFormat() {
3535
@Override
3636
public PostingsFormat getPostingsFormatForField(String field) {
37-
return Elasticsearch902Lucene103Codec.this.getPostingsFormatForField(field);
37+
return Elasticsearch92Lucene103Codec.this.getPostingsFormatForField(field);
3838
}
3939
};
4040

4141
private final DocValuesFormat defaultDVFormat;
4242
private final DocValuesFormat docValuesFormat = new XPerFieldDocValuesFormat() {
4343
@Override
4444
public DocValuesFormat getDocValuesFormatForField(String field) {
45-
return Elasticsearch902Lucene103Codec.this.getDocValuesFormatForField(field);
45+
return Elasticsearch92Lucene103Codec.this.getDocValuesFormatForField(field);
4646
}
4747
};
4848

4949
private final KnnVectorsFormat defaultKnnVectorsFormat;
5050
private final KnnVectorsFormat knnVectorsFormat = new PerFieldKnnVectorsFormat() {
5151
@Override
5252
public KnnVectorsFormat getKnnVectorsFormatForField(String field) {
53-
return Elasticsearch902Lucene103Codec.this.getKnnVectorsFormatForField(field);
53+
return Elasticsearch92Lucene103Codec.this.getKnnVectorsFormatForField(field);
5454
}
5555
};
5656

5757
/** Public no-arg constructor, needed for SPI loading at read-time. */
58-
public Elasticsearch902Lucene103Codec() {
58+
public Elasticsearch92Lucene103Codec() {
5959
this(Zstd814StoredFieldsFormat.Mode.BEST_SPEED);
6060
}
6161

6262
/**
6363
* Constructor. Takes a {@link Zstd814StoredFieldsFormat.Mode} that describes whether to optimize for retrieval speed at the expense of
6464
* worse space-efficiency or vice-versa.
6565
*/
66-
public Elasticsearch902Lucene103Codec(Zstd814StoredFieldsFormat.Mode mode) {
67-
super("Elasticsearch902Lucene103", new Lucene103Codec());
66+
public Elasticsearch92Lucene103Codec(Zstd814StoredFieldsFormat.Mode mode) {
67+
super("Elasticsearch92Lucene103", new Lucene103Codec());
6868
this.storedFieldsFormat = mode.getFormat();
6969
this.defaultPostingsFormat = new Lucene103PostingsFormat();
7070
this.defaultDVFormat = new Lucene90DocValuesFormat();

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 Elasticsearch902Lucene103Codec {
29+
public final class PerFieldMapperCodec extends Elasticsearch92Lucene103Codec {
3030

3131
private final PerFieldFormatSupplier formatSupplier;
3232

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +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.Elasticsearch902Lucene103Codec
5+
org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec

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(Elasticsearch902Lucene103Codec.class));
53+
assertThat(codecService.codec("default"), instanceOf(Elasticsearch92Lucene103Codec.class));
5454
}
5555

5656
public void testDefault() throws Exception {

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.Elasticsearch902Lucene103Codec;
14+
import org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec;
1515

1616
public class Zstd814BestCompressionStoredFieldsFormatTests extends BaseStoredFieldsFormatTestCase {
1717

18-
private final Codec codec = new Elasticsearch902Lucene103Codec(Zstd814StoredFieldsFormat.Mode.BEST_COMPRESSION);
18+
private final Codec codec = new Elasticsearch92Lucene103Codec(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.Elasticsearch902Lucene103Codec;
14+
import org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec;
1515

1616
public class Zstd814BestSpeedStoredFieldsFormatTests extends BaseStoredFieldsFormatTestCase {
1717

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

2020
@Override
2121
protected Codec getCodec() {

0 commit comments

Comments
 (0)