Skip to content

Commit 819114a

Browse files
committed
Merge remote-tracking branch 'remotes/origin/MAGETWO-98738' into owls-delivery
2 parents fee4513 + 8e90ca0 commit 819114a

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

app/code/Magento/Search/Model/ResourceModel/SynonymReader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,10 @@ protected function _construct()
8585
*/
8686
private function queryByPhrase($phrase)
8787
{
88-
$phrase = $this->fullTextSelect->removeSpecialCharacters($phrase);
8988
$matchQuery = $this->fullTextSelect->getMatchQuery(
9089
['synonyms' => 'synonyms'],
9190
$phrase,
92-
Fulltext::FULLTEXT_MODE_BOOLEAN
91+
Fulltext::FULLTEXT_MODE_NATURAL
9392
);
9493
$query = $this->getConnection()->select()->from(
9594
$this->getMainTable()

lib/internal/Magento/Framework/DB/Helper/Mysql/Fulltext.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
*/
1313
class Fulltext
1414
{
15-
/**
16-
* Characters that have special meaning in fulltext match syntax
17-
*
18-
* @var string
19-
*/
20-
const SPECIAL_CHARACTERS = '-+<>*()~';
21-
2215
/**
2316
* FULLTEXT search in MySQL search mode "natural language"
2417
*/
@@ -104,15 +97,4 @@ public function match($select, $columns, $expression, $isCondition = true, $mode
10497

10598
return $select;
10699
}
107-
108-
/**
109-
* Remove special characters from fulltext query expression
110-
*
111-
* @param string $expression
112-
* @return string
113-
*/
114-
public function removeSpecialCharacters($expression)
115-
{
116-
return str_replace(str_split(static::SPECIAL_CHARACTERS), '', $expression);
117-
}
118100
}

0 commit comments

Comments
 (0)