mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Co-authored-by: Josh Dover <doverfake@elastic.co> Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co> Co-authored-by: Josh Dover <doverfake@elastic.co>
This commit is contained in:
parent
78e74925a6
commit
19e30dd54e
1 changed files with 3 additions and 1 deletions
|
@ -86,15 +86,17 @@ export async function loadAction({
|
|||
progress.deactivate();
|
||||
const result = stats.toJSON();
|
||||
|
||||
const indicesWithDocs: string[] = [];
|
||||
for (const [index, { docs }] of Object.entries(result)) {
|
||||
if (docs && docs.indexed > 0) {
|
||||
log.info('[%s] Indexed %d docs into %j', name, docs.indexed, index);
|
||||
indicesWithDocs.push(index);
|
||||
}
|
||||
}
|
||||
|
||||
await client.indices.refresh(
|
||||
{
|
||||
index: '_all',
|
||||
index: indicesWithDocs.join(','),
|
||||
allow_no_indices: true,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue