implementation on 3party + quote keys in SearchApiQuery

This commit is contained in:
2021-06-28 22:44:42 +02:00
parent e845d9ba90
commit 0640631821
6 changed files with 77 additions and 12 deletions

View File

@@ -4,8 +4,9 @@ namespace Chill\PersonBundle\Search;
use Chill\PersonBundle\Repository\PersonRepository;
use Chill\MainBundle\Search\SearchApiQuery;
use Chill\MainBundle\Search\SearchApiInterface;
class SearchPersonApiProvider
class SearchPersonApiProvider implements SearchApiInterface
{
private PersonRepository $personRepository;
@@ -18,7 +19,7 @@ class SearchPersonApiProvider
{
$query = new SearchApiQuery();
$query
->setSelectKey("'person'")
->setSelectKey("person")
->setSelectJsonbMetadata("jsonb_build_object('id', person.id)")
->setSelectPertinence("SIMILARITY(LOWER(UNACCENT(?)), person.fullnamecanonical)", [ $pattern ])
->setFromClause("chill_person_person AS person")