how to search in custom fields & custom taxonomy for custom search

Managed to figure it out by adapting that code from the link i posted:

function atom_search_where($where){
global $wpdb;
if($_SESSION['js'] != '')
$where .= "OR (t.name LIKE '%".trim($_SESSION['js'])."%' AND {$wpdb-    >posts}.post_status="publish")";
$where .= "OR ($wpdb->postmeta.meta_key = '_job_ref' AND $wpdb->postmeta.meta_value="".$_SESSION["js']."')";
return $where;
}

function atom_search_join($join){
global $wpdb;
if($_SESSION['js'] != '')
$join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id";
$join .= "LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id)";
return $join;
}