2424import org .elasticsearch .core .Nullable ;
2525import org .elasticsearch .core .TimeValue ;
2626import org .elasticsearch .core .Tuple ;
27+ import org .elasticsearch .core .UpdateForV10 ;
2728import org .elasticsearch .core .UpdateForV9 ;
2829import org .elasticsearch .index .mapper .DateFieldMapper ;
2930import org .elasticsearch .xcontent .ToXContentObject ;
@@ -151,10 +152,16 @@ public enum Property {
151152 * Indicates that this index-level setting was deprecated in {@link Version#V_7_17_0} and is
152153 * forbidden in indices created from {@link Version#V_8_0_0} onwards.
153154 */
154- @ UpdateForV9 (owner = UpdateForV9 .Owner .CORE_INFRA ) // introduce IndexSettingDeprecatedInV8AndRemovedInV10
155+ @ UpdateForV10 (owner = UpdateForV10 .Owner .CORE_INFRA ) // remove constant if indices created in V7 couldn't be read by v10 anymore
155156 // note we still need v7 settings in v9 because we support reading from N-2 indices now
156157 IndexSettingDeprecatedInV7AndRemovedInV8 ,
157158
159+ /**
160+ * Indicates that this index-level setting was deprecated in {@link Version#V_8_18_0} and is
161+ * forbidden in indices created from {@link Version#V_9_0_0} onwards.
162+ */
163+ IndexSettingDeprecatedInV8AndRemovedInV9 ,
164+
158165 /**
159166 * Indicates that this setting is accessible by non-operator users (public) in serverless
160167 * Users will be allowed to set and see values of this setting.
@@ -176,7 +183,8 @@ public enum Property {
176183 private static final EnumSet <Property > DEPRECATED_PROPERTIES = EnumSet .of (
177184 Property .Deprecated ,
178185 Property .DeprecatedWarning ,
179- Property .IndexSettingDeprecatedInV7AndRemovedInV8
186+ Property .IndexSettingDeprecatedInV7AndRemovedInV8 ,
187+ Property .IndexSettingDeprecatedInV8AndRemovedInV9
180188 );
181189
182190 @ SuppressWarnings ("this-escape" )
@@ -216,6 +224,7 @@ private Setting(
216224 checkPropertyRequiresIndexScope (propertiesAsSet , Property .InternalIndex );
217225 checkPropertyRequiresIndexScope (propertiesAsSet , Property .PrivateIndex );
218226 checkPropertyRequiresIndexScope (propertiesAsSet , Property .IndexSettingDeprecatedInV7AndRemovedInV8 );
227+ checkPropertyRequiresIndexScope (propertiesAsSet , Property .IndexSettingDeprecatedInV8AndRemovedInV9 );
219228 checkPropertyRequiresNodeScope (propertiesAsSet );
220229 this .properties = propertiesAsSet ;
221230 }
@@ -450,7 +459,8 @@ public boolean hasIndexScope() {
450459 private boolean isDeprecated () {
451460 return properties .contains (Property .Deprecated )
452461 || properties .contains (Property .DeprecatedWarning )
453- || properties .contains (Property .IndexSettingDeprecatedInV7AndRemovedInV8 );
462+ || properties .contains (Property .IndexSettingDeprecatedInV7AndRemovedInV8 )
463+ || properties .contains (Property .IndexSettingDeprecatedInV8AndRemovedInV9 );
454464 }
455465
456466 private boolean isDeprecatedWarningOnly () {
0 commit comments