Refine search results using WP_Query

You need to just merge the current query for the search with the part you want to add which you came close to doing already.

I assume you have a custom taxonomy called media and you specifically want to leave out posts with the term media (like a term found in a tag or category) in the search results

In your case:

$custom_query = array();
$custom_query['tax_query'][] = array( 'taxonomy' => 'media', 'terms' => array('media'), 'field' => 'slug', 'operator' => 'NOT IN' );

$args = array_merge( $wp_query->query, $custom_query );
query_posts( $args );