Skip to content

Commit 2d4f079

Browse files
committed
MAGETWO-98258: Fix elacticsearch search perfomance
- fix static
1 parent 80cd335 commit 2d4f079

File tree

2 files changed

+12
-4
lines changed
  • app/code/Magento/Elasticsearch/SearchAdapter

2 files changed

+12
-4
lines changed

app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/Builder/Term.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
use Magento\Framework\Search\Request\BucketInterface as RequestBucketInterface;
99
use Magento\Framework\Search\Dynamic\DataProviderInterface;
1010

11+
/**
12+
* Builder for term buckets.
13+
*/
1114
class Term implements BucketBuilderInterface
1215
{
1316
/**
14-
* {@inheritdoc}
17+
* @inheritdoc
1518
*/
1619
public function build(
1720
RequestBucketInterface $bucket,

app/code/Magento/Elasticsearch/SearchAdapter/Query/Builder/Match.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Elasticsearch\Model\Adapter\FieldMapperInterface;
1111
use Magento\Framework\Search\Adapter\Preprocessor\PreprocessorInterface;
1212

13+
/**
14+
* Builder for match query.
15+
*/
1316
class Match implements QueryInterface
1417
{
1518
/**
@@ -40,7 +43,7 @@ public function __construct(
4043
}
4144

4245
/**
43-
* {@inheritdoc}
46+
* @inheritdoc
4447
*/
4548
public function build(array $selectQuery, RequestQueryInterface $requestQuery, $conditionType)
4649
{
@@ -61,6 +64,8 @@ public function build(array $selectQuery, RequestQueryInterface $requestQuery, $
6164
}
6265

6366
/**
67+
* Prepare query.
68+
*
6469
* @param string $queryValue
6570
* @param string $conditionType
6671
* @return array
@@ -124,11 +129,11 @@ protected function buildQueries(array $matches, array $queryValue)
124129
}
125130

126131
/**
132+
* Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.
133+
*
127134
* Cut trailing plus or minus sign, and @ symbol, using of which causes InnoDB to report a syntax error.
128135
* @link https://dev.mysql.com/doc/refman/5.7/en/fulltext-boolean.html Fulltext-boolean search docs.
129136
*
130-
* Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.
131-
*
132137
* @param string $value
133138
* @return string
134139
*/

0 commit comments

Comments
 (0)