<?php

// Add to your (child) theme's functions.php
// Change "state" and "city" to your actual facet names!

add_filter( 'facetwp_index_row', function( $params ) {
    if ( 'state' == $params['facet_name'] && 0 < $params['depth'] ) {
        $params['facet_value'] = ''; // don't index
    }
    elseif ( 'city' == $params['facet_name'] && 1 != $params['depth'] ) {
        $params['facet_value'] = ''; // don't index
    }
    return $params;
});