Browse Source

now using field bias even if set to 0 and updated toc label for library site results

2.x-ebsco
Paul Pound 7 years ago
parent
commit
05161a2e8b
  1. 2
      targets/solr_site/js/solr_site_results.js
  2. 3
      targets/solr_site/roblib_search_solr_site.module

2
targets/solr_site/js/solr_site_results.js

@ -35,7 +35,7 @@ Drupal.behaviors.roblib_search_solr_site_results = {
if (numberOfDocs > 0) { if (numberOfDocs > 0) {
results_url = '<a href="' + baseUrl + '/search/' + default_site_type + query + '?f[0]=(-bundle:bestbet)"' + '>see all results (' results_url = '<a href="' + baseUrl + '/search/' + default_site_type + query + '?f[0]=(-bundle:bestbet)"' + '>see all results ('
+ total_found + ') </a>'; + total_found + ') </a>';
move_me_div_url = '<a href="' + baseUrl + '/search/' + default_site_type + query + '?f[0]=(-bundle:bestbet)"' + '>Website & Guides (' move_me_div_url = '<a href="' + baseUrl + '/search/' + default_site_type + query + '?f[0]=(-bundle:bestbet)"' + '>Library Site ('
+ total_found + ') </a>'; + total_found + ') </a>';
jQuery('#' + 'roblib-search-solr-site-results-more').empty().append(results_url); jQuery('#' + 'roblib-search-solr-site-results-more').empty().append(results_url);
jQuery('#' + 'roblib-solr-more-results-results').empty().append(results_url); jQuery('#' + 'roblib-solr-more-results-results').empty().append(results_url);

3
targets/solr_site/roblib_search_solr_site.module

@ -357,12 +357,11 @@ function roblib_search_solr_site_get_results($query = NULL, $type) {
$solr_url = variable_get('roblib_search_solr_site_url', 'http://localhost:8983/solr'); $solr_url = variable_get('roblib_search_solr_site_url', 'http://localhost:8983/solr');
$num_results = variable_get('roblib_search_solr_site_num_results', '5'); $num_results = variable_get('roblib_search_solr_site_num_results', '5');
$solr_qf = apachesolr_environment_variable_get(apachesolr_default_environment(), 'field_bias'); $solr_qf = apachesolr_environment_variable_get(apachesolr_default_environment(), 'field_bias');
$qf = ""; $qf = "";
foreach ($solr_qf as $key => $value){ foreach ($solr_qf as $key => $value){
if($value != "0") {
$qf .= $key . '^' . $value . ' '; $qf .= $key . '^' . $value . ' ';
} }
}
$data = array( $data = array(
'q' => $query, 'q' => $query,
'fq' => $type, 'fq' => $type,

Loading…
Cancel
Save