mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[person search] increase pertinence when person's lastname starts with
search pattern
This commit is contained in:
parent
54a4b48174
commit
acc4647346
@ -12,6 +12,7 @@ and this project adheres to
|
||||
|
||||
<!-- write down unreleased development here -->
|
||||
* [person search] fix bug when using birthdate after and birthdate before
|
||||
* [person search] increase pertinence when lastname begins with search pattern
|
||||
|
||||
## Test releases
|
||||
|
||||
|
@ -137,8 +137,9 @@ final class PersonACLAwareRepository implements PersonACLAwareRepositoryInterfac
|
||||
$pertinence[] =
|
||||
'STRICT_WORD_SIMILARITY(LOWER(UNACCENT(?)), person.fullnamecanonical) + ' .
|
||||
"(person.fullnamecanonical LIKE '%' || LOWER(UNACCENT(?)) || '%')::int + " .
|
||||
"(EXISTS (SELECT 1 FROM unnest(string_to_array(fullnamecanonical, ' ')) AS t WHERE starts_with(t, UNACCENT(LOWER(?)))))::int";
|
||||
array_push($pertinenceArgs, $str, $str, $str);
|
||||
"(EXISTS (SELECT 1 FROM unnest(string_to_array(fullnamecanonical, ' ')) AS t WHERE starts_with(t, UNACCENT(LOWER(?)))))::int + " .
|
||||
'(starts_with(LOWER(UNACCENT(lastname)), UNACCENT(LOWER(?))))::int';
|
||||
array_push($pertinenceArgs, $str, $str, $str, $str);
|
||||
|
||||
$orWhereSearchClause[] =
|
||||
'(LOWER(UNACCENT(?)) <<% person.fullnamecanonical OR ' .
|
||||
|
Loading…
x
Reference in New Issue
Block a user