adaptations for third party search

This commit is contained in:
2021-10-12 09:28:53 +02:00
parent f4369553e1
commit e9192c5011
5 changed files with 138 additions and 19 deletions

View File

@@ -27,7 +27,7 @@ class SearchUserApiProvider implements SearchApiInterface
->setSelectPertinence("GREATEST(SIMILARITY(LOWER(UNACCENT(?)), u.usernamecanonical),
SIMILARITY(LOWER(UNACCENT(?)), u.emailcanonical))", [ $pattern, $pattern ])
->setFromClause("users AS u")
->setWhereClause("SIMILARITY(LOWER(UNACCENT(?)), u.usernamecanonical) > 0.15
->setWhereClauses("SIMILARITY(LOWER(UNACCENT(?)), u.usernamecanonical) > 0.15
OR
SIMILARITY(LOWER(UNACCENT(?)), u.emailcanonical) > 0.15
", [ $pattern, $pattern ]);