From ca328c34648dd7e07f70e1844e07cfc392e41103 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 16 May 2017 16:50:12 -0700 Subject: [PATCH] [esArchiver] refresh modified indices after load --- src/es_archiver/actions/load.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/es_archiver/actions/load.js b/src/es_archiver/actions/load.js index 91c4f0b6edafc35..ef96f14fdea63f1 100644 --- a/src/es_archiver/actions/load.js +++ b/src/es_archiver/actions/load.js @@ -31,8 +31,14 @@ export async function loadAction({ name, skipExisting, client, dataDir, log }) { ]); } + const indicesToRefresh = []; stats.forEachIndex((index, { docs }) => { log.info('[%s] Indexed %d docs into %j', name, docs.indexed, index); + indicesToRefresh.push(index); + }); + + await client.indices.refresh({ + index: indicesToRefresh }); return stats.toJSON();