From c1af6e2ce0eec169e4cba92599bb7fb1dac01411 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Wed, 9 Sep 2020 13:39:38 +0100 Subject: [PATCH] Addressing code review comments --- x-pack/plugins/ml/common/types/file_datavisualizer.ts | 3 +++ .../ml/server/models/file_data_visualizer/import_data.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/common/types/file_datavisualizer.ts b/x-pack/plugins/ml/common/types/file_datavisualizer.ts index f8ac7ac0b663f..a8b775c8d5f60 100644 --- a/x-pack/plugins/ml/common/types/file_datavisualizer.ts +++ b/x-pack/plugins/ml/common/types/file_datavisualizer.ts @@ -84,6 +84,9 @@ export interface Settings { } export interface Mappings { + _meta?: { + created_by: string; + }; properties: { [key: string]: any; }; diff --git a/x-pack/plugins/ml/server/models/file_data_visualizer/import_data.ts b/x-pack/plugins/ml/server/models/file_data_visualizer/import_data.ts index 4bf2ade04d356..26dba7c2f00c1 100644 --- a/x-pack/plugins/ml/server/models/file_data_visualizer/import_data.ts +++ b/x-pack/plugins/ml/server/models/file_data_visualizer/import_data.ts @@ -89,7 +89,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) { } async function createIndex(index: string, settings: Settings, mappings: Mappings) { - const body: { mappings: Mappings } = { + const body: { mappings: Mappings; settings?: Settings } = { mappings: { _meta: { created_by: INDEX_META_DATA_CREATED_BY,