Пример #1
0
 public function searchTask()
 {
     $searchRequest = Request::getVar('search', array());
     $query = $searchRequest['query'];
     $HubtypeFilter = $searchRequest['type'];
     $hubSearch = new SearchEngine();
     if ($HubtypeFilter != '') {
         //$search = $hubSearch->createFilterQuery('hubtype')->setQuery('hubtype:'.$HubtypeFilter)->search($query)->limit(100);
         $search = $hubSearch->search($query)->limit(100);
     } else {
         $search = $hubSearch->search($query)->limit(100);
     }
     $result = $search->getResult();
     $response = new stdClass();
     $response->results = $result;
     $response->search = $search;
     $response->queryString = $query;
     return $this->displayTask($response);
 }
Пример #2
0
 public function viewLogsTask()
 {
     $hubSearch = new SearchEngine();
     $hubSearch->getLog();
     echo "<pre>";
     print_r($hubSearch->logs);
     exit;
 }