From d30848eb23353121d80cc93c83d2c8613d41d541 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 11 Mar 2019 17:26:16 +0100 Subject: [PATCH] change internal index to index doc_type, id, source and dest (#39913) change internal index to index doc_type, id, source and dest --- .../xpack/core/dataframe/DataFrameField.java | 2 ++ .../action/PreviewDataFrameTransformAction.java | 3 ++- .../transforms/DataFrameTransformConfig.java | 14 ++++++-------- .../persistence/DataFrameInternalIndex.java | 11 +++++++---- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/DataFrameField.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/DataFrameField.java index 73bdca2e59e..e25b2619b19 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/DataFrameField.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/DataFrameField.java @@ -24,6 +24,8 @@ public final class DataFrameField { public static final ParseField WAIT_FOR_COMPLETION = new ParseField("wait_for_completion"); public static final ParseField STATS_FIELD = new ParseField("stats"); public static final ParseField INDEX_DOC_TYPE = new ParseField("doc_type"); + public static final ParseField SOURCE = new ParseField("source"); + public static final ParseField DESTINATION = new ParseField("dest"); // common strings public static final String TASK_NAME = "data_frame/transforms"; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/action/PreviewDataFrameTransformAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/action/PreviewDataFrameTransformAction.java index 18860661801..ef170dcf9bc 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/action/PreviewDataFrameTransformAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/action/PreviewDataFrameTransformAction.java @@ -23,6 +23,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.dataframe.DataFrameField; import org.elasticsearch.xpack.core.dataframe.transforms.DataFrameTransformConfig; import java.io.IOException; @@ -58,7 +59,7 @@ public class PreviewDataFrameTransformAction extends Action content = parser.map(); // Destination and ID are not required for Preview, so we just supply our own - content.put(DataFrameTransformConfig.DESTINATION.getPreferredName(), "unused-transform-preview-index"); + content.put(DataFrameField.DESTINATION.getPreferredName(), "unused-transform-preview-index"); try(XContentBuilder xContentBuilder = XContentFactory.jsonBuilder().map(content); XContentParser newParser = XContentType.JSON .xContent() diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformConfig.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformConfig.java index 1b86310aeee..d50716317a0 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformConfig.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformConfig.java @@ -38,8 +38,6 @@ public class DataFrameTransformConfig extends AbstractDiffable p.mapStrings(), HEADERS); @@ -121,8 +119,8 @@ public class DataFrameTransformConfig extends AbstractDiffable