Glad it worked out for you :)
The following code is fairly crude search, so if I put "Bristol city" in the search it will use LIKE '%Bristol%city%'..
$arrSearchQuery = explode(' ',$form->getSearchQuery());
$strSearchQuery = '%'.implode('%',$arrSearchQuery).'%';
$dos = DataObject::get('YOURDATAOBJECT',"FIELD LIKE '".$strSearchQuery."'");
if you wanted to search two fields just expand your where clause...
$dos = DataObject::get('YOURDATAOBJECT',
"FIELD LIKE '".$strSearchQuery."'"
." OR OTHERFIELD LIKE '".$strSearchQuery."'"
);
If you want to search over a couple of DataObject... just repeat the DataObject::get and then the "if ($dos){..." this will get more objects and then push them on the search results.
if you want one set higher than the other in the results change the " $p->Relevance = 1; " part
Barry