Advanced search fixed to work with new gender entity

This commit is contained in:
2024-10-22 14:50:06 +02:00
parent 588f02cdf4
commit 5dfa5e1e7f
5 changed files with 29 additions and 18 deletions

View File

@@ -62,12 +62,12 @@ abstract class AbstractSearch implements SearchInterface
$recomposed .= ' '.$term.':';
$containsSpace = str_contains((string) $terms[$term], ' ');
if ($containsSpace) {
if ($containsSpace || is_numeric($terms[$term])) {
$recomposed .= '"';
}
$recomposed .= (false === mb_stristr(' ', (string) $terms[$term])) ? $terms[$term] : '('.$terms[$term].')';
if ($containsSpace) {
if ($containsSpace || is_numeric($terms[$term])) {
$recomposed .= '"';
}
}