You are here

public function FacetapiQuery::addFacetField in Faceted Navigation for Search 7

Adds the facet field, ensures the alias is "value".

Parameters

array $query_info: An associative array of query information.

@return FacetapiQuery An instance of this class.

File

./search_facetapi.extender.inc, line 48
Facet query builder, strips all scoring from the SearchQuery class.

Class

FacetapiQuery
Extension of the SearchQuery class.

Code

public function addFacetField(array $query_info) {
  foreach ($query_info['fields'] as $field_info) {
    $this
      ->addField($field_info['table_alias'], $field_info['field'], 'value');
  }
  return $this;
}