SELECT SQL_CALC_FOUND_ROWS suisse_sites.*, categoryId, packageId, 0 as isNew FROM suisse_sites WHERE status = 'validated' AND ((MATCH (siteTitle, description) AGAINST ('+aek +bank +1826 +genossenschaft' IN BOOLEAN MODE)) AND (address like '%thun%' OR description like '%thun%' OR city like '%thun%')) AND 1=1 UNION DISTINCT ( select suisse_sites.*, categoryId, packageId, 0 as isNew from suisse_sites INNER JOIN suisse_keywordsofsites ON suisse_keywordsofsites.siteId = suisse_sites.siteId INNER JOIN suisse_keywords ON suisse_keywords.keywordId = suisse_keywordsofsites.keywordId where status = 'validated' and suisse_keywords.keyword IN ('aek','bank','1826','genossenschaft') AND (address like '%thun%' OR suisse_sites.description like '%thun%' OR suisse_sites.city like '%thun%') ) ORDER BY priority DESC, creationDate DESC LIMIT 30 OFFSET 0