Skip to content

Commit 29fc10d

Browse files
authored
[ML] Use 'anomaly-detector' in job config doc name (#36254)
1 parent fd1e6d4 commit 29fc10d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public DatafeedConfig(StreamInput in) throws IOException {
219219
* @return The ID of document the datafeed config is persisted in
220220
*/
221221
public static String documentId(String datafeedId) {
222-
return "datafeed-" + datafeedId;
222+
return TYPE + "-" + datafeedId;
223223
}
224224

225225
public String getId() {

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public static String documentId(String jobId) {
238238
throw new IllegalArgumentException(Messages.getMessage(Messages.JOB_CONFIG_ID_TOO_LONG, MlStrings.ID_LENGTH_LIMIT));
239239
}
240240

241-
return "job-" + jobId;
241+
return ANOMALY_DETECTOR_JOB_TYPE + "-" + jobId;
242242
}
243243

244244

0 commit comments

Comments
 (0)