1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 16:54:44 +02:00

Update DatabaseQuerySelectFulltext so that too-long words combined with individual word-matching operators are truncated rather than removed.

This commit is contained in:
Ryan Cramer
2025-07-20 10:29:27 -04:00
parent eda5129884
commit ff69aa56a1

View File

@@ -1215,6 +1215,7 @@ class DatabaseQuerySelectFulltext extends Wire {
'stopwords' => true, // allow stopwords
'indexable' => false, // include only indexable words?
'alternates' => false, // include alternate versions of words?
'truncate' => true,
);
$options = count($options) ? array_merge($defaults, $options) : $defaults;
@@ -1312,6 +1313,7 @@ class DatabaseQuerySelectFulltext extends Wire {
*
*/
protected function strlen($value) {
$value = (string) $value;
if(function_exists('mb_strlen')) {
return mb_strlen($value);
} else {