Durch genaues analysieren eines mysql artikels bin ich auf die Lösung gekommen
Falls es wen interessiert:
Code:
$total ="
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = '_views'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'post'
AND wposts.ID = ANY (
SELECT wposts.ID
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE
( ( MATCH(wposts.post_title, wposts.post_excerpt) AGAINST ('".$keywords."' IN BOOLEAN MODE) )
OR ( wpostmeta.meta_value LIKE '%".$keywords."%' ) )
AND wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'tags'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'post'
)
ORDER BY CAST(wpostmeta.meta_value AS SIGNED) ASC
";