You are here

public function Solr_Base_Query::add_subquery in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 5 Solr_Base_Query.php \Solr_Base_Query::add_subquery()
  2. 6 Solr_Base_Query.php \Solr_Base_Query::add_subquery()
  3. 6.2 Solr_Base_Query.php \Solr_Base_Query::add_subquery()

A subquery is another instance of a Solr_Base_Query that should be joined to the query. The operator determines whether it will be joined with AND or OR.

Parameters

$query: An instance of Drupal_Solr_Query_Interface.

$operator: 'AND' or 'OR'

Overrides Drupal_Solr_Query_Interface::add_subquery

File

./Solr_Base_Query.php, line 254

Class

Solr_Base_Query

Code

public function add_subquery(Drupal_Solr_Query_Interface $query, $fq_operator = 'OR', $q_operator = 'AND') {
  $this->subqueries[$query->id] = array(
    '#query' => $query,
    '#fq_operator' => $fq_operator,
    '#q_operator' => $q_operator,
  );
}