Skip to content

Commit

Permalink
[esArchiver] refresh modified indices after load
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed May 16, 2017
1 parent cde74a5 commit ca328c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/es_archiver/actions/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ca328c3

Please sign in to comment.