You are here

function hook_facetapi_facet_info_alter in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 facetapi.api.php \hook_facetapi_facet_info_alter()
  2. 6 facetapi.api.inc \hook_facetapi_facet_info_alter()
  3. 7 facetapi.api.php \hook_facetapi_facet_info_alter()

Allows for alterations to the facet definitions.

Parameters

array &$facet_info: The return values of hook_facetapi_facet_info() implementations.

array $searcher_info: The definition of the searcher that facets are being collected for.

See also

hook_facetapi_facet_info()

1 invocation of hook_facetapi_facet_info_alter()
facetapi_get_facet_info in ./facetapi.module
Returns all defined facet definitions available to the searcher.

File

./facetapi.api.php, line 241
Hooks provided by the Facet API module.

Code

function hook_facetapi_facet_info_alter(array &$facet_info, array $searcher_info) {

  // Change the author index field for Apache Solr searchers indexing node data.
  if ('apachesolr' == $searcher_info['adapter'] && isset($searcher_info['types']['node'])) {
    $facet_info['author']['field'] = 'is_uid';
  }
}