If you are talking about the Algolia plugin for WordPress, you can definitely define the / hook function to decide whether to index the type of post or not.
For example, you could write:
<?php
function exclude_post_types( $should_index, WP_Post $post )
{
if ( false === $should_index ) {
return false;
}
$excluded_post_types = array( 'myprivatetype' );
return ! in_array( $post->post_type, $excluded_post_types, true );
}
add_filter( 'algolia_should_index_searchable_post', 'exclude_post_types', 10, 2 );
You can read more: https://community.algolia.com/wordpress/indexing-flow.html#indexing-decision
redox source
share