Skip to content

Commit

Permalink
fix-issue-20716
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Jan 28, 2019
1 parent 2b27bc0 commit cb681ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ protected function _construct()
*/
private function queryByPhrase($phrase)
{
$phrase = rtrim($phrase, "-");
$matchQuery = $this->fullTextSelect->getMatchQuery(
['synonyms' => 'synonyms'],
$phrase,
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Search/Model/SynonymAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public function getSynonymsForPhrase($phrase)
return $result;
}

$phrase = rtrim($phrase, "-");

$synonymGroups = $this->getSynonymGroupsByPhrase($phrase);

// Replace multiple spaces in a row with the only one space
Expand Down

0 comments on commit cb681ab

Please sign in to comment.