Vintage Gruen
The forum for Gruen watch enthusiasts.

Home » Member Forums » Improvements » Search not working consistently
Re: Search not working consistently [message #13991 is a reply to message #13989] Sat, 28 November 2020 03:12 Go to previous messageGo to previous message
Gary
Messages: 2108
Registered: May 2013
Location: Left Coast
Gruen Authority
Cheerleader

Case wrote on Sat, 28 November 2020 02:59
Oops, 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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Should we have Mentors here at the forum?
Next Topic: External Sites for Gruen Information
Goto Forum:
  


Current Time: Sun Apr 28 18:30:30 UTC 2024

Total time taken to generate the page: 0.00980 seconds