Skip to content

Commit

Permalink
EZP-26499: Aligned SQL Search Engine FullText criterion handler with …
Browse files Browse the repository at this point in the history
…changes to WordIndexer (#1823)
  • Loading branch information
alongosz authored and andrerom committed Nov 14, 2016
1 parent 4317000 commit 2e48a5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions eZ/Publish/API/Repository/Tests/SearchEngineIndexingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ public function getSpecialFullTextCases()
['"quoted text"', 'quoted text'],
['ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ', 'àáâãäåçèéêëìíîïðñòóôõöøùúûüý'],
['with boundary.', 'with boundary'],
['Folder1.', 'Folder1.'],
['whitespaces', " whitespaces \n \t "],
// @todo: Remove as soon as elastic is updated to later version not affected
["it's", "it's", [LegacyElasticsearch::class]],
['with_underscore', 'with_underscore'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,7 @@ public function accept(Criterion $criterion)
*/
protected function tokenizeString($string)
{
return array_filter(
array_map(
'trim',
preg_split('(\\p{Z})u', strtr($string, '\'"', ''))
)
);
return preg_split('/[^\w|*]/u', $string, -1, PREG_SPLIT_NO_EMPTY);
}

/**
Expand Down

0 comments on commit 2e48a5b

Please # to comment.