Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
BaseSelectFullTextSearchStrategy.php
Go to the documentation of this file.
1 <?php
8 
13 
25 {
29  private $scopeResolver;
30 
34  private $resource;
35 
40  public function __construct(
41  ResourceConnection $resource,
42  IndexScopeResolver $scopeResolver
43  ) {
44  $this->resource = $resource;
45  $this->scopeResolver = $scopeResolver;
46  }
47 
55  public function createBaseSelect(SelectContainer $selectContainer)
56  {
57  $select = $this->resource->getConnection()->select();
58 
59  $tableName = $this->scopeResolver->resolve(
60  $selectContainer->getUsedIndex(),
61  $selectContainer->getDimensions()
62  );
63 
64  $select->from(
65  ['search_index' => $tableName],
66  ['entity_id' => 'entity_id']
67  )->joinInner(
68  ['cea' => $this->resource->getTableName('catalog_eav_attribute')],
69  'search_index.attribute_id = cea.attribute_id',
70  []
71  );
72 
73  $selectContainer = $selectContainer->updateSelect($select);
74  return $selectContainer;
75  }
76 }
$tableName
Definition: trigger.php:13
$resource
Definition: bulk.php:12