facetwp index category and its children

<?php

/** reindex after adding filter code */

add_filter( 'facetwp_index_row', function( $params, $class ) {
	if ( 'label_fr' == $params['facet_name'] ) { // change if needed
		if ( 183 != $params['term_id'] && 183 != $params['parent_id']  ) ) {
			$params['facet_value'] = '';
		}
	}
	return $params;
}, 10, 2 );