Example #1
0
 /**
  * Initiate the search with pazpar2 for this set of targets
  *
  * @return Query
  */
 public function search(Query $query, $start = 0, $max = 100)
 {
     // flesh out target information from the kb
     $query->fillTargetInfo();
     if (isset($query->limits) && sizeof($query->limits) > 0) {
         $terms = array();
         foreach ($query->limits as $limit_term) {
             $facets[] = urlencode(preg_replace('/facet\\./', '', $limit_term->field) . $limit_term->relation . $limit_term->value);
         }
     } else {
         $facets = null;
     }
     $maxrecs = $this->conf()->getConfig('RECORDS_PER_TARGET', false);
     // start the search
     $sid = $query->sid;
     $this->client($sid)->search($query->toQuery(), $query->getTargetIDs(), $facets, $maxrecs);
 }