diff --git a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/config_index_mappings.json b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/config_index_mappings.json index 9098ff084afc2..5ee5957e49331 100644 --- a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/config_index_mappings.json +++ b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/config_index_mappings.json @@ -40,9 +40,6 @@ "lambda" : { "type" : "double" }, - "maximum_number_trees" : { - "type" : "integer" - }, "max_trees" : { "type" : "integer" }, @@ -90,9 +87,6 @@ "lambda" : { "type" : "double" }, - "maximum_number_trees" : { - "type" : "integer" - }, "max_trees" : { "type" : "integer" }, diff --git a/x-pack/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/MlConfigIndexMappingsFullClusterRestartIT.java b/x-pack/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/MlConfigIndexMappingsFullClusterRestartIT.java index 2dc76febf8dc4..6d8ce026ed3d0 100644 --- a/x-pack/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/MlConfigIndexMappingsFullClusterRestartIT.java +++ b/x-pack/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/MlConfigIndexMappingsFullClusterRestartIT.java @@ -77,7 +77,16 @@ public void testMlConfigIndexMappingsAfterMigration() throws Exception { // trigger .ml-config index mappings update createAnomalyDetectorJob(NEW_CLUSTER_JOB_ID); // assert that the mappings are updated - assertThat(getConfigIndexMappings(), equalTo(expectedConfigIndexMappings)); + Map configIndexMappings = getConfigIndexMappings(); + + // Remove renamed fields + if (getOldClusterVersion().onOrAfter(Version.V_7_7_0)) { + configIndexMappings = XContentMapValues.filter(expectedConfigIndexMappings, null, new String[] { + "analysis.properties.*.properties.maximum_number_trees" // This was renamed to max_trees + }); + } + + assertThat(configIndexMappings, equalTo(expectedConfigIndexMappings)); } }