Skip to content

Commit 5a2da25

Browse files
committed
address bwc failures
1 parent 3e60a74 commit 5a2da25

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ public abstract class XPerFieldDocValuesFormat extends DocValuesFormat {
4444
public static final String PER_FIELD_NAME = "ESPerFieldDV819";
4545

4646
/** {@link FieldInfo} attribute name used to store the format name for each field. */
47-
public static final String PER_FIELD_FORMAT_KEY = XPerFieldDocValuesFormat.class.getSimpleName() + ".format";
47+
// FORK note: usage of PerFieldDocValuesFormat is needed for bwc purposes.
48+
// (Otherwise, we load no fields from indices that use PerFieldDocValuesFormat)
49+
public static final String PER_FIELD_FORMAT_KEY = PerFieldDocValuesFormat.class.getSimpleName() + ".format";
4850

4951
/** {@link FieldInfo} attribute name used to store the segment suffix name for each field. */
50-
public static final String PER_FIELD_SUFFIX_KEY = XPerFieldDocValuesFormat.class.getSimpleName() + ".suffix";
52+
// FORK note: usage of PerFieldDocValuesFormat is needed for bwc purposes.
53+
public static final String PER_FIELD_SUFFIX_KEY = PerFieldDocValuesFormat.class.getSimpleName() + ".suffix";
5154

5255
/** Sole constructor. */
5356
protected XPerFieldDocValuesFormat() {
@@ -285,6 +288,7 @@ public static class FieldsReader extends DocValuesProducer {
285288
}
286289
}
287290

291+
// FORK note: the reason why PerFieldDocValuesFormat is forked:.
288292
public DocValuesProducer getDocValuesProducer(FieldInfo field) {
289293
return fields.get(field.number);
290294
}

0 commit comments

Comments
 (0)