mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Warn users that compound terms separated by apostrophes don't work in the MySQL FULLTEXT index either
Summary: Ref T12928. Like `v0.1`, terms in the form `yo's` (sequences of two or fewer characters separated by apostrophes) do not get indexed. Test Plan: {F5078192} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12928 Differential Revision: https://secure.phabricator.com/D18324
This commit is contained in:
parent
ba4b936dff
commit
cfb86dddd2
1 changed files with 3 additions and 2 deletions
|
@ -554,9 +554,10 @@ final class PhabricatorMySQLFulltextStorageEngine
|
|||
// "ab.cd", where short substrings are separated by periods, do not produce
|
||||
// any queryable tokens. These terms are meaningful if at least one
|
||||
// substring is longer than the minimum length, like "example.py". See
|
||||
// T12928.
|
||||
// T12928. This also applies to words with intermediate apostrophes, like
|
||||
// "to's".
|
||||
|
||||
$parts = preg_split('/[.]+/', $value);
|
||||
$parts = preg_split('/[.\']+/', $value);
|
||||
|
||||
foreach ($parts as $part) {
|
||||
if (phutil_utf8_strlen($part) >= $min_length) {
|
||||
|
|
Loading…
Reference in a new issue