summaryrefslogtreecommitdiffstats
path: root/facets.api.php
blob: 208a9055f68c975cee5f9d4ba06e85b1fafc73dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * @file
 * Hooks provided by the Facets module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Alter the Facets Query Type mapping.
 *
 * Modules may implement this hook to alter the mapping that defines how a
 * certain data type should be handled in Search API based Facets.
 *
 * @param array $query_types
 *   The Search API backend info array, keyed by backend ID.
 *
 * @see \Drupal\facets\Plugin\facets\facet_source\SearchApiBaseFacetSource
 */
function hook_facets_search_api_query_type_mapping_alter($backend_plugin_id, array &$query_types) {
  if ($backend_plugin_id == 'search_api_solr') {
    $query_types['string'] = 'search_api_solr_string';
  }
}