Skip to content

Commit 1e16962

Browse files
committed
Add new index setting for ignored version
1 parent 3048dae commit 1e16962

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,15 @@ public String toString() {
13461346
Property.InternalIndex
13471347
);
13481348

1349+
public static final String INDEX_IGNORE_DEPRECATION_WARNING_FOR_VERSION_KEY = "index.ignore_deprecation_warning_for_version";
1350+
public static final Setting<IndexVersion> IGNORE_INDEX_DEPRECATION_WARNING_FOR_VERSION_SETTING = Setting.versionIdSetting(
1351+
INDEX_IGNORE_DEPRECATION_WARNING_FOR_VERSION_KEY,
1352+
IndexVersions.ZERO,
1353+
IndexVersion::fromId,
1354+
Property.IndexScope,
1355+
Property.Dynamic
1356+
);
1357+
13491358
// LIFECYCLE_NAME is here an as optimization, see LifecycleSettings.LIFECYCLE_NAME and
13501359
// LifecycleSettings.LIFECYCLE_NAME_SETTING for the 'real' version
13511360
public static final String LIFECYCLE_NAME = "index.lifecycle.name";

server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
189189
IgnoredSourceFieldMapper.SKIP_IGNORED_SOURCE_READ_SETTING,
190190
SourceFieldMapper.INDEX_MAPPER_SOURCE_MODE_SETTING,
191191
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
192+
IndexMetadata.IGNORE_INDEX_DEPRECATION_WARNING_FOR_VERSION_SETTING,
192193

193194
// validate that built-in similarities don't get redefined
194195
Setting.groupSetting("index.similarity.", (s) -> {

0 commit comments

Comments
 (0)