Drupal
Here is a solution for those using Drupal CMS.
First find your field name in Schema Browser in /solr/admin/schema.jsp
Then, depending on the module used, try the following examples:
Apacheolr Module
Code example:
function hook_apachesolr_query_alter(DrupalSolrQueryInterface $query) { $query->addParam('bq', array('is_review' => '(is_review:true^100 OR is_review:false^0)' )); }
Search for the Solr API module
Code example:
/** * Implements hook_search_api_solr_query_alter(). */ function hook_search_api_solr_query_alter(&$call_args, SearchApiQueryInterface $query) { $call_args['params']['bq'][] = '(is_review:true^100 OR is_review:false^0)'; }
kenorb
source share