From 2c3ce5b9ded43ed40470a8fa29267d2a34d94fda Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Thu, 3 Jan 2019 14:59:42 -0600 Subject: [PATCH] [ML] add min_version field to machine learning results index mapping (#37115) * ML: add min_version field to mapping * Adding min_version as reserved field name --- .../xpack/core/ml/job/persistence/ElasticsearchMappings.java | 2 ++ .../xpack/core/ml/job/results/ReservedFieldNames.java | 1 + 2 files changed, 3 insertions(+) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java index b3d4155f30a..0ed8c9f08b8 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java @@ -898,6 +898,8 @@ public class ElasticsearchMappings { builder.startObject(ModelSnapshot.QUANTILES.getPreferredName()) .field(ENABLED, false) + .endObject().startObject(ModelSnapshot.MIN_VERSION.getPreferredName()) + .field(TYPE, KEYWORD) .endObject() .startObject(ModelSnapshot.LATEST_RECORD_TIME.getPreferredName()) .field(TYPE, DATE) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java index 646671c2c39..f6b90b69ea6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java @@ -167,6 +167,7 @@ public final class ReservedFieldNames { ModelSnapshot.LATEST_RECORD_TIME.getPreferredName(), ModelSnapshot.LATEST_RESULT_TIME.getPreferredName(), ModelSnapshot.RETAIN.getPreferredName(), + ModelSnapshot.MIN_VERSION.getPreferredName(), Result.RESULT_TYPE.getPreferredName(), Result.TIMESTAMP.getPreferredName(),