You are here

protected function Solr_Base_Query::rebuild_query in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 5 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
  2. 6 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
  3. 6.2 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
1 call to Solr_Base_Query::rebuild_query()
Solr_Base_Query::get_query_basic in ./Solr_Base_Query.php
A function to get just the keyword components of the query, omitting any field:value portions.

File

./Solr_Base_Query.php, line 472

Class

Solr_Base_Query

Code

protected function rebuild_query() {
  $query = $this->keys;
  foreach ($this->subqueries as $id => $data) {
    $operator = $data['#q_operator'];
    $subquery = $data['#query']
      ->get_query_basic();
    if ($subquery) {
      $query .= " {$operator} ({$subquery})";
    }
  }
  return $query;
}