diff --git a/src/core_plugins/elasticsearch/lib/ensure_types_exist.js b/src/core_plugins/elasticsearch/lib/ensure_types_exist.js index 34a88f791334b..f1751af055464 100644 --- a/src/core_plugins/elasticsearch/lib/ensure_types_exist.js +++ b/src/core_plugins/elasticsearch/lib/ensure_types_exist.js @@ -55,13 +55,15 @@ export async function ensureTypesExist({ log, indexName, callCluster, types }) { properties: { [type.name]: type.mapping } - } + }, + update_all_types: true }); } else { await callCluster('indices.putMapping', { index: indexName, type: type.name, - body: type.mapping + body: type.mapping, + update_all_types: true }); } }