diff --git a/src/Plugin/facetapi/query_type/SearchApiTerm.php b/src/Plugin/facetapi/query_type/SearchApiTerm.php deleted file mode 100644 index a37b4ebb865ce33bf59a773ab7f5d8a8c26d8c3f..0000000000000000000000000000000000000000 --- a/src/Plugin/facetapi/query_type/SearchApiTerm.php +++ /dev/null @@ -1,77 +0,0 @@ -query; - // Alter the query here. - if (! empty($query)) { - $options = &$query->getOptions(); - - $field_identifier = $this->facet->getFieldIdentifier(); - $options['search_api_facets'][$field_identifier] = array( - 'field' => $field_identifier, - 'limit' => 50, - 'operator' => 'and', - 'min_count' => 0, - // Key used in SearchApiSolrBackend::extractFacets(). - 'missing' => FALSE, - ); - - // Add the filter to the query if there are active values. - $active_items = $this->facet->getActiveItems(); - if (count($active_items)) { - foreach ($active_items as $value) { - $filter = $query->createFilter(); - $filter->condition($this->facet->getFieldIdentifier(), $value); - $query->filter($filter); - } - } - } - } - - /** - * Build the facet information, - * so it can be rendered. - * - * @return mixed - */ - public function build() { - if (! empty ($this->results)) { - $facet_results = array(); - foreach ($this->results as $result) { - if ($result['count']) { - $facet_results[] = new Result(trim($result['filter'], '"'), $result['count']); - } - } - $this->facet->setResults($facet_results); - } - return $this->facet; - } -}