[ML] Fix broken backwards compatibility of field names (elastic/x-pack-elasticsearch#3463)
Original commit: elastic/x-pack-elasticsearch@64eb6b49a41c2a9f3215ce5cf3a7f34ab6a60942
@@ -83,7 +83,8 @@ public class Detector implements ToXContentObject, Writeable {
public static final ParseField PARTITION_FIELD_NAME_FIELD = new ParseField("partition_field_name");
public static final ParseField USE_NULL_FIELD = new ParseField("use_null");
public static final ParseField EXCLUDE_FREQUENT_FIELD = new ParseField("exclude_frequent");
- public static final ParseField RULES_FIELD = new ParseField("rules");
+ // TODO: Remove the deprecated detector_rules setting in 7.0
+ public static final ParseField RULES_FIELD = new ParseField("rules", "detector_rules");
public static final ParseField DETECTOR_INDEX = new ParseField("detector_index");
// These parsers follow the pattern that metadata is parsed leniently (to allow for enhancements), whilst config is parsed strictly
