How could you make the query below sorted by relevance and then by date?
$query = $mysqli->prepare(
"SELECT 'id', 'titulo', 'foto', 'descricao', 'slug', 'data', '' as 'local' FROM 'noticias' WHERE MATCH ('titulo', 'descricao') AGAINST (?)
UNION
SELECT 'id', 'titulo', 'foto', '' as 'descricao', 'slug', 'data', 'local' FROM 'galeria' WHERE MATCH ('titulo', 'local') AGAINST (?) ORDER BY 'data' DESC"
);
Currently you are sorting by date, but wanted by relevance according to the search.
Example:
Currently if I search for "Feast of Mary" it is appearing like this:
I wanted it to look like this: