add_filter() depending on search term

The pre_get_posts action runs before the posts_join and posts_where filters.

So, pre_get_posts is a suitable hook for conditionally adding callbacks to the posts_join and posts_where filters:

function wpse249060_pre_get_posts( $query ) {
    // Make sure we're doing a search query and that the search
    // term is NOT 'something'
    if ( $query->is_search() && $query->query_vars['s'] !== 'something' ) {
        add_filter( 'posts_join', 'wpse249060_posts_join' );
        add_filter( 'posts_where','wpse249060_posts_where' );
    }
}
add_action( 'pre_get_posts', 'wpse249060_pre_get_posts' );

function wpse249060_posts_join( $join ) {
    //exit ( print_r( $join ) );
    return $join;
}

function wpse249060_posts_where( $where ) {
    //exit ( print_r( $where ) );
    return $where;
}