createFindQuery( 'Article' ); // where either body or title contains test but not article $searchWord = 'test -article'; // run the query builder to search for the $searchWord in body and title $qb = new ezcSearchQueryBuilder(); $qb->parseSearchQuery( $q, $searchWord, array( 'body', 'title' ) ); // run the query and show titles for found documents, and its score $r = $session->find( $q ); foreach( $r->documents as $res ) { echo $res->document->score, ", ", $res->document->title, "\n"; } ?>