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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user