Skip to content

Commit 37897ff

Browse files
committed
MAGETWO-39942: Low quick search performance(MySql)
- Fix static and unit tests
1 parent cadb4a9 commit 37897ff

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

app/code/Magento/CatalogSearch/Setup/InstallData.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,14 @@ class InstallData implements InstallDataInterface
2323
/**
2424
* @param IndexerInterfaceFactory $indexerFactory
2525
*/
26-
public function __construct(IndexerInterfaceFactory $indexerFactory,
27-
ProductAttributeRepositoryInterface $attributeRepository)
28-
{
26+
public function __construct(
27+
IndexerInterfaceFactory $indexerFactory,
28+
ProductAttributeRepositoryInterface $attributeRepository
29+
) {
2930
$this->indexerFactory = $indexerFactory;
3031
$this->attributeRepository = $attributeRepository;
3132
}
3233

33-
/**
34-
* @param string $indexerId
35-
* @return \Magento\Indexer\Model\IndexerInterface
36-
*/
37-
private function getIndexer($indexerId)
38-
{
39-
return $this->indexerFactory->create()->load($indexerId);
40-
}
41-
4234
/**
4335
* Installs data for a module
4436
*
@@ -54,6 +46,15 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
5446
$this->getIndexer('catalogsearch_fulltext')->reindexAll();
5547
}
5648

49+
/**
50+
* @param string $indexerId
51+
* @return \Magento\Indexer\Model\IndexerInterface
52+
*/
53+
private function getIndexer($indexerId)
54+
{
55+
return $this->indexerFactory->create()->load($indexerId);
56+
}
57+
5758
/**
5859
* @param string $attributeCode
5960
* @param int $weight

0 commit comments

Comments
 (0)