From 1385f880f7947fabbe14e5f878fa54728bf0cafb Mon Sep 17 00:00:00 2001 From: David Kyle Date: Wed, 5 Dec 2018 12:22:37 +0000 Subject: [PATCH] Use 'anomaly-detector' in job config doc name --- .../elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java | 2 +- .../java/org/elasticsearch/xpack/core/ml/job/config/Job.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java index 4f7eb4b9aa3a9..d4a1f5005e9ea 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java @@ -219,7 +219,7 @@ public DatafeedConfig(StreamInput in) throws IOException { * @return The ID of document the datafeed config is persisted in */ public static String documentId(String datafeedId) { - return "datafeed-" + datafeedId; + return TYPE + "-" + datafeedId; } public String getId() { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java index 0d9c4093c139e..327c3f7d59e7c 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java @@ -238,7 +238,7 @@ public static String documentId(String jobId) { throw new IllegalArgumentException(Messages.getMessage(Messages.JOB_CONFIG_ID_TOO_LONG, MlStrings.ID_LENGTH_LIMIT)); } - return "job-" + jobId; + return ANOMALY_DETECTOR_JOB_TYPE + "-" + jobId; }