Skip to content

Commit cd9180b

Browse files
MAGETWO-64766: [Performance] Investigate and optimize price layered navigation
1 parent 2eac274 commit cd9180b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/CatalogSearch/Model/Search/IndexBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function build(RequestInterface $request)
132132
['entity_id' => 'entity_id']
133133
);
134134

135-
if ($this->fullTextSearchCheck->check($request->getQuery())) {
135+
if ($this->fullTextSearchCheck->isRequiredForQuery($request->getQuery())) {
136136
$select->joinLeft(
137137
['cea' => $this->resource->getTableName('catalog_eav_attribute')],
138138
'search_index.attribute_id = cea.attribute_id',

app/code/Magento/CatalogSearch/Model/Search/QueryChecker/FullTextSearchCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FullTextSearchCheck
2828
* @return bool
2929
* @throws \InvalidArgumentException
3030
*/
31-
public function check(QueryInterface $query)
31+
public function isRequiredForQuery(QueryInterface $query)
3232
{
3333
return $this->processQuery($query);
3434
}

app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function setUp()
2828
public function testPositiveCheck($query, $errorMsg)
2929
{
3030
$this->assertTrue(
31-
$this->fullTextSearchCheck->check($query),
31+
$this->fullTextSearchCheck->isRequiredForQuery($query),
3232
$errorMsg
3333
);
3434
}
@@ -42,7 +42,7 @@ public function testPositiveCheck($query, $errorMsg)
4242
public function testNegativeCheck($query, $errorMsg)
4343
{
4444
$this->assertFalse(
45-
$this->fullTextSearchCheck->check($query),
45+
$this->fullTextSearchCheck->isRequiredForQuery($query),
4646
$errorMsg
4747
);
4848
}
@@ -61,7 +61,7 @@ public function testInvalidArgumentException1()
6161
->method('getType')
6262
->willReturn('42');
6363

64-
$this->fullTextSearchCheck->check($matchQueryMock);
64+
$this->fullTextSearchCheck->isRequiredForQuery($matchQueryMock);
6565
}
6666

6767
/**

0 commit comments

Comments
 (0)