|
|
Re: Search not working consistently [message #2964 is a reply to message #2962] |
Wed, 12 February 2014 04:20   |
|
Good find! Numbers are not being indexed, only textual entries in the default software. There is a way but I have to modify a search array in the code.
I'll proof this out on our test forum and let you know how it goes.
Guess us old members here have that search indexing in our heads.
Thanks again for pointing this out!
|
|
|
|
|
|
|
|
|
|
|
|
Re: Search not working consistently [message #13991 is a reply to message #13989] |
Sat, 28 November 2020 03:12   |
|
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
|
|
|
|
|
|
|