How to exclude custom fields from search queries?

If I understand you correctly, you need to have post metas in your query. This is where the meta_query parameter of the WP_Query class comes to help.
The meta_query is an array of arrays.

Example from the codex:

$args = array(
   'post_type' => 'my_custom_post_type',
   'meta_key' => 'age',
   'orderby' => 'meta_value_num',
   'order' => 'ASC',
   'meta_query' => array(
       array(
           'key' => 'age',
           'value' => array(3, 4),
           'compare' => 'IN',
       )
   )
 );
 $query = new WP_Query($args);