diff --git a/apollo/server/routes/api_compat.py b/apollo/server/routes/api_compat.py index d8cc29a..cf3d908 100644 --- a/apollo/server/routes/api_compat.py +++ b/apollo/server/routes/api_compat.py @@ -161,6 +161,7 @@ async def fetch_advisories_compat( count(a.*) over () as total from advisories a + left outer join advisory_affected_products ap on ap.advisory_id = a.id left outer join advisory_cves c on c.advisory_id = a.id left outer join advisory_fixes f on f.advisory_id = a.id where @@ -173,7 +174,7 @@ async def fetch_advisories_compat( and ((select severity from vars) is null or a.severity = (select severity from vars)) and ((select kind from vars) is null or a.kind = (select kind from vars)) and ((select search from vars) is null or - exists (select name from advisory_affected_products where advisory_id = a.id and name like '%' || (select product from vars) || '%') or + ap.name like '%' || (select product from vars) || '%' or a.synopsis ilike '%' || (select search from vars) || '%' or a.description ilike '%' || (select search from vars) || '%' or exists (select cve from advisory_cves where advisory_id = a.id and cve ilike '%' || (select search from vars) || '%') or