SilverStripes out of the box search is pretty basic and only searches the Content and page Titles etc..
What we do is create a normal form in the template and point its action at a new Page Types action eg:
class SearchPage extends Page {
...
}
class SearchPage_Controller extends Page_Controller {
public $searchEntry = "";
public $resultsSize = 0;
public function init() {
parent::init();
if(isset($_GET["browseall"]))
{
unset($_SESSION["search_input"]);
}
if(isset($_POST["search_input"]) && $_POST["search_input"] != 'Search Products') {
$this->searchEntry = filter_var($_POST["search_input"], FILTER_SANITIZE_STRING);
$_SESSION["search_input"] = $this->searchEntry;
}
else if (isset($_SESSION["search_input"]))
{
$this->searchEntry = $_SESSION["search_input"];
}
}
public function doSearch()
{
if(!isset($_GET['start']) || !is_numeric($_GET['start']) || (int)$_GET['start'] < 1)
{
$_GET['start'] = 0;
}
$SQL_start = (int)$_GET['start'];
$results = DataObject::get('Product',
"Title LIKE '%".$this->searchEntry."%' ".
"OR Brand LIKE '%".$this->searchEntry."%' ".
"OR PartNumber LIKE '%".$this->searchEntry."%' ".
"OR MetaTitle LIKE '%".$this->searchEntry."%' ".
"OR MetaDescription LIKE '%".$this->searchEntry."%' ".
"OR FIND_IN_SET('".trim($this->searchEntry)."', `MetaKeywords`) > 0", "Title ASC", NULL, "{$SQL_start},".Page::$resultsPerPage);
$title = empty($this->searchEntry)?'Search Results':'Search results for: '.$this->searchEntry;
if ($results)
{
$this->resultsSize = $results->Count();
}
$data = array(
'Results' => $results,
'Query' => !isset($_GET['q'])?$this->searchEntry:$_GET['q'],
'Title' => $title
);
return $this->customise($data)->renderWith(array('SearchPage', 'Page'));
}
}
What we are doing here is calling '<searchpage-urlsegment>/doSearch' and searching the products but also MetaDescription and MetaKeywords you could modify this to search Page Content, Title instead fairly easily.