mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
effectively filter on all words in third party search
This commit is contained in:
parent
612d053892
commit
645549ae34
@ -85,12 +85,12 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
|||||||
$pertinenceArgs = [];
|
$pertinenceArgs = [];
|
||||||
|
|
||||||
foreach ($strs as $str) {
|
foreach ($strs as $str) {
|
||||||
if (!empty($str)) {
|
if ('' !== trim($str)) {
|
||||||
$wheres[] = "(LOWER(UNACCENT(?)) <<% tparty.canonicalized OR
|
$wheres[] = "((LOWER(UNACCENT(?)) <<% tparty.canonicalized OR
|
||||||
tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')
|
tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')
|
||||||
OR
|
OR
|
||||||
(LOWER(UNACCENT(?)) <<% parent.canonicalized OR
|
(LOWER(UNACCENT(?)) <<% parent.canonicalized OR
|
||||||
parent.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')
|
parent.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%'))
|
||||||
";
|
";
|
||||||
$whereArgs[] = [$str, $str, $str, $str];
|
$whereArgs[] = [$str, $str, $str, $str];
|
||||||
$pertinence[] = 'GREATEST(
|
$pertinence[] = 'GREATEST(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user