From be3547f14af5fe6d042dbb350bedbd101a7333b5 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Thu, 10 Aug 2017 15:29:39 -0300 Subject: [PATCH] added bq parameters to solr search request --- targets/solr_site/roblib_search_solr_site.module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/targets/solr_site/roblib_search_solr_site.module b/targets/solr_site/roblib_search_solr_site.module index 23fff7c..32db59e 100755 --- a/targets/solr_site/roblib_search_solr_site.module +++ b/targets/solr_site/roblib_search_solr_site.module @@ -360,13 +360,22 @@ function roblib_search_solr_site_get_results($query = NULL, $type) { $qf = ""; foreach ($solr_qf as $key => $value){ + if($value != '0') { $qf .= $key . '^' . $value . ' '; + } + } + $bq = ""; + foreach ($solr_qf as $key => $value){ + if($value != '0') { + $bq .= $key . '^' . $value . ' '; + } } $data = array( 'q' => $query, 'fq' => $type, 'wt' => 'json', 'qf' => $qf, + 'bq' => $bq, 'rows' => $num_results, ); $url = url($solr_url . '/select', array('query' => $data));