コード例 #1
0
 /**
  * @throws Application_Exception
  * @throws Application_SearchException
  *
  * TODO this should happen in model class so it can be tested directly
  */
 private function performSearch()
 {
     $this->getLogger()->debug('performing search');
     try {
         $searcher = new Opus_SolrSearch_Searcher();
         $openFacets = $this->_facetMenu->buildFacetArray($this->getRequest()->getParams());
         $searcher->setFacetArray($openFacets);
         $this->_resultList = $searcher->search($this->_query);
         $this->view->openFacets = $openFacets;
     } catch (Opus_SolrSearch_Exception $e) {
         $this->getLogger()->err(__METHOD__ . ' : ' . $e);
         throw new Application_SearchException($e);
     }
     $this->_numOfHits = $this->_resultList->getNumberOfHits();
 }
コード例 #2
0
 public function testBuildEmptyFacetArray()
 {
     $model = new Solrsearch_Model_FacetMenu();
     $this->assertNull($model->buildFacetArray(array()));
 }