function facetapi_luceneapi_facetapi_facet_info_alter in Facet API 6
Implementation of hook_facetapi_facet_info_alter().
File
- contrib/
facetapi_luceneapi/ facetapi_luceneapi.module, line 84 - The Search Lucene API module's implementation of the the Facet API.
Code
function facetapi_luceneapi_facetapi_facet_info_alter(array &$facets, $searcher, $type) {
if ('luceneapi_node' == $searcher) {
foreach ($facets as &$facet) {
if (preg_match('/^vocabulary_(\\d+)$/', $facet['name'], $matches)) {
$facet['field'] = 'category_' . $matches[1];
$facet['field alias'] = 'category';
}
}
unset($facet);
}
}