Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-elasticsearch
SearchAdapter
SearchIndexNameResolver.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Elasticsearch\SearchAdapter
;
7
8
use
Magento\CatalogSearch\Model\Indexer\Fulltext
;
9
use
Magento\Elasticsearch\Model\Config
;
10
16
class
SearchIndexNameResolver
17
{
21
private
$clientConfig;
22
26
public
function
__construct
(
27
Config
$clientConfig
28
) {
29
$this->clientConfig = $clientConfig;
30
}
31
40
public
function
getIndexName
(
$storeId
, $indexerId)
41
{
42
$mappedIndexerId = $this->getIndexMapping($indexerId);
43
return
$this->clientConfig->getIndexPrefix() .
'_'
. $mappedIndexerId .
'_'
.
$storeId
;
44
}
45
52
private
function
getIndexMapping($indexerId)
53
{
54
if
($indexerId ==
Fulltext::INDEXER_ID
) {
55
$mappedIndexerId =
'product'
;
56
}
else
{
57
$mappedIndexerId = $indexerId;
58
}
59
return
$mappedIndexerId;
60
}
61
}
Magento\Elasticsearch\Model\Config
Definition:
Config.php:21
Magento\CatalogSearch\Model\Indexer\Fulltext
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver\getIndexName
getIndexName($storeId, $indexerId)
Definition:
SearchIndexNameResolver.php:40
Magento\CatalogSearch\Model\Indexer\Fulltext\INDEXER_ID
const INDEXER_ID
Definition:
Fulltext.php:31
Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver\__construct
__construct(Config $clientConfig)
Definition:
SearchIndexNameResolver.php:26
Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver
Definition:
SearchIndexNameResolver.php:16
Magento\Elasticsearch\SearchAdapter
Definition:
AdapterTest.php:6