See More

provide()->indexName(); try { $this->get->execute($indexAlias); throw new \Spameri\Elastic\Exception\IndexAlreadyExists($indexAlias); } catch (\Spameri\Elastic\Exception\ElasticSearch $exception) { $indexName = $indexAlias . '-' . $this->dateTimeProvider->provide()->format(\Spameri\Elastic\Entity\Property\DateTime::INDEX_FORMAT); $this->create->execute($indexName, $indexConfig->provide()->toArray(), $indexAlias); $this->addAlias->execute($indexAlias, $indexName); } } }