Skip to content

Commit 3b3be18

Browse files
authored
Add javadocs for Lucene 7 codec classes (#117819)
1 parent ae3d0b9 commit 3b3be18

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

x-pack/plugin/old-lucene-versions/src/main/java/org/elasticsearch/xpack/lucene/bwc/codecs/lucene70/BWCLucene70Codec.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
import org.elasticsearch.xpack.lucene.bwc.codecs.BWCCodec;
2626
import org.elasticsearch.xpack.lucene.bwc.codecs.lucene60.Lucene60MetadataOnlyPointsFormat;
2727

28+
/**
29+
* Implements the Lucene 7.0 index format. Loaded via SPI for indices created/written with Lucene 7.x (Elasticsearch 6.x) mounted
30+
* as archive indices first in Elasticsearch 8.x. Lucene 9.12 retained Lucene70Codec in its classpath which required overriding the
31+
* codec name and version in the segment infos. This codec is still needed after upgrading to Elasticsearch 9.x because its codec
32+
* name has been written to disk.
33+
*/
2834
public class BWCLucene70Codec extends BWCCodec {
2935

3036
private final FieldInfosFormat fieldInfosFormat = wrap(new Lucene60FieldInfosFormat());
@@ -46,6 +52,8 @@ public PostingsFormat getPostingsFormatForField(String field) {
4652
}
4753
};
4854

55+
// Needed for SPI loading
56+
@SuppressWarnings("unused")
4957
public BWCLucene70Codec() {
5058
this("BWCLucene70Codec");
5159
}

x-pack/plugin/old-lucene-versions/src/main/java/org/elasticsearch/xpack/lucene/bwc/codecs/lucene70/Lucene70Codec.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
package org.elasticsearch.xpack.lucene.bwc.codecs.lucene70;
99

10+
/**
11+
* Implements the Lucene 7.0 index format. Will be loaded via SPI for indices created/written with Lucene 7.x (Elasticsearch 6.x) mounted
12+
* as archive indices in Elasticsearch 9.x. Note that for indices with same version mounted first as archive indices in Elasticsearch 8.x,
13+
* {@link BWCLucene70Codec} will be instead used which provides the same functionality, only registered with a different name.
14+
*
15+
* @deprecated Only for 7.0 back compat
16+
*/
17+
@Deprecated
1018
public class Lucene70Codec extends BWCLucene70Codec {
1119

1220
public Lucene70Codec() {

0 commit comments

Comments
 (0)