I eventually solved this by applying a search filter over the original
query:
function searchfilter( $query ) {
if ( isset( $query[‘s’] ) ) {
$query[‘post_type’] = array(‘posttype1′,’posttype1’);
}
return $query;
}
add_filter(‘request’, ‘searchfilter’, 1);
I wonder why it won’t work without it though…