Prevent search query from taking place when using Google CSE?

Same issue with you and just found it out on stackexchange.
Put codes below in the function.php in your theme.

function _cancel_query( $query ) {
    if ( !is_admin() && !is_feed() && is_search() ) {
        $query = false;
    }
    return $query;
}
add_action( 'posts_request', '_cancel_query' );

Here’s the source