<?php
/** check the post type and return false if its not the post type we
** want to index for this filter
**/
add_filter( 'facetwp_index_row', function( $params, $class ) {
if ( 'collections_filter' == $params['facet_name'] && 'collection' != get_post_type( $params['post_id'] ) ) {
return false;
}
return $params;
}, 10, 2);