diff --git a/Classes/Command/IndexCommand.php b/Classes/Command/IndexCommand.php index e357435..0488941 100644 --- a/Classes/Command/IndexCommand.php +++ b/Classes/Command/IndexCommand.php @@ -457,7 +457,7 @@ protected function swapIndexAliases(string $indexName, string $tempIndexAlias): protected function deleteOldIndexes($indexName): void { try { - $aliasesRequest = $this->client->indices()->getAlias(['name' => $this->extConf['elasticIndexName'].'_*']); + $aliasesRequest = $this->client->indices()->getAlias(['name' => $this->extConf['elasticIndexName'].'-index']); $aliasesArray = $aliasesRequest->asArray(); // sort $aliasesArray by key name @@ -478,10 +478,10 @@ protected function deleteOldIndexes($indexName): void catch (\Exception $e) { // other versions return a Message object if ($e->getCode() === 404) { - $this->io->note("Nothing to remove, there are no indexes with alias " . $this->extConf['elasticIndexName'].'_*'); + $this->io->note("Nothing to remove, there are no indexes with alias " . $this->extConf['elasticIndexName'].'-index'); } else { $this->io->error("Exception: " . $e->getMessage()); - $this->logger->error('Bibliography sync unsuccessful. Error getting alias: ' . $this->extConf['elasticIndexName'].'_*'); + $this->logger->error('Bibliography sync unsuccessful. Error getting alias: ' . $this->extConf['elasticIndexName'].'-index'); throw new \Exception('Bibliography sync unsuccessful.', 0, $e); } }