private function Solr_Base_Query::rebuild_query in Apache Solr Search 5
Same name and namespace in other branches
- 5.2 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
- 6 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
- 6.2 Solr_Base_Query.php \Solr_Base_Query::rebuild_query()
3 calls to Solr_Base_Query::rebuild_query()
File
- ./
Solr_Base_Query.php, line 267
Class
Code
private function rebuild_query() {
$fields = array();
foreach ($this->_fields as $pos => $values) {
$fields[] = Solr_Base_Query::make_field($values);
}
$join_delim = $this->_field_operator == 'AND' ? ' ' : ' OR ';
$this->_query = trim(implode($join_delim, array_filter($fields, 'trim')));
foreach ($this->_subqueries as $id => $data) {
$operator = $data['#operator'];
$subquery = $data['#query']
->get_query();
$this->_query .= " {$operator} ({$subquery})";
}
}