Browse Source

added bq parameters to solr search request

2.x-ebsco
Paul Pound 7 years ago
parent
commit
be3547f14a
  1. 9
      targets/solr_site/roblib_search_solr_site.module

9
targets/solr_site/roblib_search_solr_site.module

@ -360,13 +360,22 @@ function roblib_search_solr_site_get_results($query = NULL, $type) {
$qf = ""; $qf = "";
foreach ($solr_qf as $key => $value){ foreach ($solr_qf as $key => $value){
if($value != '0') {
$qf .= $key . '^' . $value . ' '; $qf .= $key . '^' . $value . ' ';
} }
}
$bq = "";
foreach ($solr_qf as $key => $value){
if($value != '0') {
$bq .= $key . '^' . $value . ' ';
}
}
$data = array( $data = array(
'q' => $query, 'q' => $query,
'fq' => $type, 'fq' => $type,
'wt' => 'json', 'wt' => 'json',
'qf' => $qf, 'qf' => $qf,
'bq' => $bq,
'rows' => $num_results, 'rows' => $num_results,
); );
$url = url($solr_url . '/select', array('query' => $data)); $url = url($solr_url . '/select', array('query' => $data));

Loading…
Cancel
Save