|
|
|
|
|
|
|
|
|
|
|
|
Re: Search not working consistently [message #13991 is a reply to message #13989] |
Sat, 28 November 2020 03:12   |
Gary
Messages: 2142 Registered: May 2013 Location: Seattle
|
Gruen Authority Cheerleader |

|
|
Case wrote on Sat, 28 November 2020 02:59Oops, spoke too soon. It worked on 835. No results on 89.
That's an enhancement meaning its not coded to do so, too short meaning 3 or more, try 2019. I believe it's like that so we don't peg the database with thousands of hits.
These are the only 2 options, I can do a patch but that will take some effort.
if (@preg_match('/\p{L}/u', 'a') == 1) { // PCRE unicode support is turned on
// Match utf-8 words to index:
// - If you also want to index numbers, use regex "/[\p{N}\p{L}][\p{L}\p{N}\p{Mn}\p{Pd}'\x{2019}]*/u".
// - Remove the \p{N} if you don't want to index words with numbers in them.
preg_match_all("/\p{L}[\p{L}\p{N}\p{Mn}\p{Pd}'\x{2019}]*/u", $text, $t1);
foreach ($t1[0] as $v) {
if ($lang != 'zh-hans' && $lang != 'zh-hant' && $lang != 'ja' && $lang != 'ko') { // Not Chinese, Japanese nor Korean.
if (isset($v[51]) || !isset($v[2])) continue; // Word too short or long.
}
$a[] = _esc($v);
}
return $a;
[Updated on: Sat, 28 November 2020 03:55] Report message to a moderator
|
|
|
|
|
|
|