|
|
@ -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)); |
|
|
|