mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
thirdparty search: add where clause for searching into children
This commit is contained in:
parent
f2221565c5
commit
bc99c85802
@ -87,8 +87,12 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
||||
foreach ($strs as $str) {
|
||||
if (!empty($str)) {
|
||||
$wheres[] = "(LOWER(UNACCENT(?)) <<% tparty.canonicalized OR
|
||||
tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')";
|
||||
$whereArgs[] = [$str, $str];
|
||||
tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')
|
||||
OR
|
||||
(LOWER(UNACCENT(?)) <<% parent.canonicalized OR
|
||||
parent.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')
|
||||
";
|
||||
$whereArgs[] = [$str, $str, $str, $str];
|
||||
$pertinence[] = 'STRICT_WORD_SIMILARITY(LOWER(UNACCENT(?)), tparty.canonicalized) + ' .
|
||||
"(tparty.canonicalized LIKE '%s' || LOWER(UNACCENT(?)) || '%')::int + " .
|
||||
// take postcode label into account, but lower than the canonicalized field
|
||||
|
Loading…
x
Reference in New Issue
Block a user