public function SolrFilterSubQuery::getFilters in Apache Solr Search 7
Same name and namespace in other branches
- 8 Solr_Base_Query.php \SolrFilterSubQuery::getFilters()
- 6.3 Solr_Base_Query.php \SolrFilterSubQuery::getFilters()
File
- ./
Solr_Base_Query.php, line 48 - This class allows you to make operations on a query that will be sent to Apache Solr. methods such as adding and removing sorts, remove and replace parameters, adding and removing filters, getters and setters for various parameters and more
Class
- SolrFilterSubQuery
- This class allows you to make operations on a query that will be sent to Apache Solr. methods such as adding and removing sorts, remove and replace parameters, adding and removing filters, getters and setters for various parameters and…
Code
public function getFilters($name = NULL) {
if (empty($name)) {
return $this->fields;
}
reset($this->fields);
$matches = array();
foreach ($this->fields as $filter) {
if ($filter['#name'] == $name) {
$matches[] = $filter;
}
}
return $matches;
}