Update PartSearchFilter.php

This commit is contained in:
d-buchmann 2026-02-16 09:28:48 +01:00 committed by GitHub
parent d903c1c931
commit e5b3507bcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,7 +148,8 @@ class PartSearchFilter implements FilterInterface
params[] = new \Doctrine\ORM\Query\Parameter('id_exact', (int) $this->keyword,
ParameterType::INTEGER);
}
if ($this->regex) {
//Convert the fields to search to a list of expressions
$expressions = array_map(function (string $field): string {
return sprintf("REGEXP(%s, :search_query) = TRUE", $field);