From c647d7f38b473014f5a62c7dea9661f794d59716 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Thu, 11 Jan 2018 17:01:37 +0000 Subject: [PATCH] [ML] Adjust BWC for categorization analyzer config after backporting elastic/x-pack-elasticsearch#3372 Original commit: elastic/x-pack-elasticsearch@27fcd5bdcb02450fa85b17df85aceecee5dcd79b --- .../elasticsearch/xpack/ml/job/config/AnalysisConfig.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java index 76f1828763b..826a77c94ec 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java @@ -159,8 +159,7 @@ public class AnalysisConfig implements ToXContentObject, Writeable { bucketSpan = new TimeValue(in); categorizationFieldName = in.readOptionalString(); categorizationFilters = in.readBoolean() ? in.readList(StreamInput::readString) : null; - // TODO: change to 6.2.0 after backporting - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_2_0)) { categorizationAnalyzerConfig = in.readOptionalWriteable(CategorizationAnalyzerConfig::new); } else { categorizationAnalyzerConfig = null; @@ -186,8 +185,7 @@ public class AnalysisConfig implements ToXContentObject, Writeable { } else { out.writeBoolean(false); } - // TODO: change to 6.2.0 after backporting - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_2_0)) { out.writeOptionalWriteable(categorizationAnalyzerConfig); } out.writeOptionalWriteable(latency);