Skip to content

Commit d99614c

Browse files
fix: gate timestamp doc values sparse idnex behind index version
1 parent a13c553 commit d99614c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/index/IndexVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ private static Version parseUnchecked(String version) {
146146
public static final IndexVersion HOSTNAME_DOC_VALUES_SPARSE_INDEX = def(9_008_0_00, Version.LUCENE_10_0_0);
147147
public static final IndexVersion UPGRADE_TO_LUCENE_10_1_0 = def(9_009_0_00, Version.LUCENE_10_1_0);
148148
public static final IndexVersion USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT = def(9_010_00_0, Version.LUCENE_10_1_0);
149+
public static final IndexVersion TIMESTAMP_DOC_VALUES_SPARSE_INDEX = def(9_011_0_00, Version.LUCENE_10_1_0);
149150
/*
150151
* STOP! READ THIS FIRST! No, really,
151152
* ____ _____ ___ ____ _ ____ _____ _ ____ _____ _ _ ___ ____ _____ ___ ____ ____ _____ _

server/src/main/java/org/elasticsearch/index/mapper/DateFieldMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ private Long parseNullValue(DateFieldType fieldType) {
400400
public DateFieldMapper build(MapperBuilderContext context) {
401401
final String fullFieldName = context.buildFullName(leafName());
402402
boolean hasDocValuesSkipper = useDocValuesSkipper
403+
&& indexCreatedVersion.onOrAfter(IndexVersions.TIMESTAMP_DOC_VALUES_SPARSE_INDEX)
403404
&& hasDocValuesSkipper(docValues.getValue(), indexMode, indexSortConfig, fullFieldName);
404405
DateFieldType ft = new DateFieldType(
405406
fullFieldName,

0 commit comments

Comments
 (0)