Exemplo n.º 1
0
 /** Display the index page.
  */
 public function resultsAction()
 {
     $params = $this->getAllParams();
     $search = new Pas_Solr_Handler();
     $search->setCore('objects');
     $context = $this->_helper->contextSwitch->getCurrentContext();
     $fields = new Pas_Solr_FieldGeneratorFinds();
     $fields->setContext($context);
     if ($context) {
         $params['format'] = $context;
     }
     $search->setFacets(array('objectType', 'county', 'broadperiod', 'institution', 'rulerName', 'denominationName', 'mintName', 'materialTerm', 'workflow', 'reeceID'));
     $search->setParams($params);
     $search->execute();
     $this->view->facets = $search->processFacets();
     $this->view->paginator = $search->createPagination();
     $this->view->stats = $search->processStats();
     $this->view->results = $search->processResults();
     $this->view->server = $search->getLoadBalancerKey();
     if (array_key_exists('submit', $params)) {
         $queries = new Searches();
         $queries->insertResults(serialize($params));
     }
 }