1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Add articles which have annotations with search term in results

Fix #3635
This commit is contained in:
Nicolas Lœuillet 2023-07-29 10:18:11 +02:00 committed by Nicolas Lœuillet
parent 85065b509f
commit 18e1106f76
2 changed files with 14 additions and 1 deletions

View file

@ -133,8 +133,10 @@ class EntryRepository extends ServiceEntityRepository
// We lower() all parts here because PostgreSQL 'LIKE' verb is case-sensitive
$qb
->andWhere('lower(e.content) LIKE lower(:term) OR lower(e.title) LIKE lower(:term) OR lower(e.url) LIKE lower(:term)')->setParameter('term', '%' . $term . '%')
->andWhere('lower(e.content) LIKE lower(:term) OR lower(e.title) LIKE lower(:term) OR lower(e.url) LIKE lower(:term) OR lower(a.text) LIKE lower(:term)')
->setParameter('term', '%' . $term . '%')
->leftJoin('e.tags', 't')
->leftJoin('e.annotations', 'a')
->groupBy('e.id');
return $qb;