Are post ID’s searchable in Relevanssi?
No. Relevanssi does understand the WP_Query p parameter to restrict the search by post ID.
However, if you want to search by post ID, it’s very simple to make that happen using the relevanssi_content_to_index filter hook:
add_filter( 'relevanssi_content_to_index', 'rlv_index_post_id', 10, 2 );
function rlv_index_post_id( $content, $post ) {
$content .= ' ' . $post->ID;
return $content;
}Add that to theme functions.php, reindex and searching for post ID’s works.
Does that contains products id also?
Sure, a post ID is a post ID, no matter the post type. They’re all posts to Relevanssi.