function hook_facetapi_facet_info_alter in Facet API 6.3
Same name and namespace in other branches
- 6 facetapi.api.inc \hook_facetapi_facet_info_alter()
- 7.2 facetapi.api.php \hook_facetapi_facet_info_alter()
- 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
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 234 - 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';
}
}