Use createFilter to build an advanced query using AND and OR with the search API
This should be possible:

&lt;?php
$or1 = $query-&gt;createFilter('OR');
$or1-&gt;condition('field_last_name', 'name');
$or1-&gt;condition('field_first_name', 'name');
$query-&gt;filter($or1);

$query-&gt;condition('field_postal_code', 'zip');
$query-&gt;condition('field_city', 'city');

$or2 = $query-&gt;createFilter('OR');
$or2-&gt;condition('field_interests', 'keywords'); 
// if field is fulltext, the default '=' operator is interpreted as 'contains'. 
// to search over all fulltext fields: $query-&gt;keys('keywords')
$or2-&gt;condition('field_hobbies', 'keywords');
//...
$query-&gt;filter($or2);
$query-&gt;sort('field', 'ASC');
$query-&gt;execute();


But IMHO and unfortunately you won’t be able to further nest queries/filters like AND ((field1 = 1 AND field2 = 1) OR (field1 = 2 AND field2 = 2)). I’m going to open another thread for this problem.