diff --git a/Search/SimilarPersonMatcher.php b/Search/SimilarPersonMatcher.php index 7d672d4df..2667f061f 100644 --- a/Search/SimilarPersonMatcher.php +++ b/Search/SimilarPersonMatcher.php @@ -70,10 +70,12 @@ class SimilarPersonMatcher ); $dql = 'SELECT p from ChillPersonBundle:Person p WHERE' - . ' UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:firstName))' - . ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:lastName))' - . ' OR UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:lastName))' - . ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:firstName))' + . ' (' + . ' UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:firstName)) ' + . ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:lastName)) ' + . ' OR UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:lastName)) ' + . ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:firstName)) ' + . ' ) ' . ' AND p.center IN (:centers)'; $query =