Skip to content

Commit

Permalink
sort other indices, resolve #59
Browse files Browse the repository at this point in the history
  • Loading branch information
limenet committed Feb 22, 2024
1 parent b991eb0 commit 2672a55
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Command/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->setHeaderTitle('Indices (managed by this bundle)');
$table->render();

$otherIndexNames = [];

foreach ($this->esClient->getCluster()->getIndexNames() as $indexName) {
if (in_array($indexName, $this->skipOtherIndices, true) || !$this->shouldProcessNonBundleIndex($indexName)) {
continue;
}
$this->processOtherIndex($indexName);
$otherIndexNames[] = $indexName;
}

sort($otherIndexNames);

foreach ($otherIndexNames as $otherIndexName) {
$this->processOtherIndex($otherIndexName);
}

$this->output->writeln('');
Expand Down

0 comments on commit 2672a55

Please sign in to comment.