ahhhh I mis understood... might something like this help...
in Page.php
/**
* Process and render search results
*/
function results($data, $form){
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);
/////////////////////////////////////////////////////////////
// Start Custom
$arrSearchQuery = explode(' ',$form->getSearchQuery());
$strSearchQuery = '%'.implode('%',$arrSearchQuery).'%';
$dos = DataObject::get('YOURDATAOBJECT',"FIELD LIKE '".$strSearchQuery."'");
//make our our result set
$dosNewRestults = new DataObjectSet();
if ($dos)
{
$arr = $dos->toArray();
foreach ($arr as $do)
{
$p = new Page();
$p->Title = $do->SOMEFIELD;
$p->URLSegment = 'SOMEURL?POSTVAR='.$do->SOMEFIELD;;
$p->Content = $do->SOMEFIELD;;
$p->Name = $do->SOMEFIELD;;
$p->Relevance = 1;
$p->CanViewType = 'Anyone';
$dosNewRestults->push($p);
}
}
//strip out the html from the results and append them to the results
//above - so that the ones with things to buy are first
if ($data['Results']->Count() > 0)
{
$arr = $data['Results']->toArray();
foreach ($arr as $do)
{
$do->Content = strip_tags($do->Content);
$dosNewRestults->push($do);
}
}
$data['Results'] = $dosNewRestults;
// End Custom
/////////////////////////////////////////////////////////////
return $this->customise($data)->renderWith(array('Page_results', 'Page'));
}
It ain't the best, but it might help.
Barry