Created
August 8, 2012 13:53
-
-
Save dbolser/3295160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_facetapi_facet_info(). | |
* Provides the definitions for the extra facets. | |
* | |
* @param array $searcher_info | |
* The definition of the searcher that facets are being collected for. | |
* | |
* @return array | |
* An associative array keyed by unique name of the facet. | |
*/ | |
function apachesolr_external_index_facetapi_facet_info($searcher_info) { | |
$facets = array(); | |
$searcher_info = facetapi_get_searcher_info(); | |
$facets['cat'] = array( | |
'name' => 'category', | |
'label' => t('Category'), | |
'description' => t('Filter by category.'), | |
'field' => 'ss_cat', | |
'field alias' => 'cat', | |
'field api bundles' => array('node'), | |
'facet mincount allowed' => TRUE, | |
'dependency plugins' => array('bundle', 'role'), | |
); | |
return $facets; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment