12 use Psr\Log\LoggerInterface;
67 $this->client = $this->connectionManager->getConnection(
$options);
68 }
catch (\Exception $e) {
69 $this->logger->critical($e);
71 __(
'The search failed because of a search engine misconfiguration.')
84 return $this->clientConfig->getIndexPrefix();
98 return $this->clientConfig->getIndexPrefix() .
'_' . $mappedIndexerId .
'_' .
$storeId;
112 if (isset($preparedIndex[
$storeId])) {
116 if (empty($indexName)) {
149 if ($this->client->existsAlias($namespace)) {
150 $alias = $this->client->getAlias($namespace);
151 $indices = array_keys(
$alias);
152 foreach ($indices as
$index) {
153 if (strpos(
$index, $indexPattern) === 0) {
172 $mappedIndexerId =
'product';
174 $mappedIndexerId = $indexerId;
176 return $mappedIndexerId;
getIndexNameForAlias($storeId, $mappedIndexerId)
__construct(ConnectionManager $connectionManager, Config $clientConfig, LoggerInterface $logger, $options=[])
getIndexPattern($storeId, $mappedIndexerId)
getIndexFromAlias($storeId, $mappedIndexerId)
getIndexMapping($indexerId)
getIndexName($storeId, $mappedIndexerId, array $preparedIndex)