Main problem with your code is that tax_query
should be an array of queries, and not a single query.
$tax_query = array(
array(
'taxonomy' => 'filter',
'terms' => array(30140, 30020, 30008, 29998, 29991, 21458,20197,11986,6614),
'field' => 'term_id',
'operator' => 'NOT IN'
)
);
$query->set( 'tax_query', $tax_query );