You are here

function hook_facets_search_api_query_type_mapping_alter in Facets 8

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.

Parameters

array $query_types: The Search API backend info array, keyed by backend ID.

See also

\Drupal\facets\Plugin\facets\facet_source\SearchApiBaseFacetSource

2 invocations of hook_facets_search_api_query_type_mapping_alter()
SearchApiBaseFacetSource::getQueryTypesForDataType in src/Plugin/facets/facet_source/SearchApiBaseFacetSource.php
Retrieves the query types for a specified data type.
SearchApiDisplay::getQueryTypesForDataType in src/Plugin/facets/facet_source/SearchApiDisplay.php
Retrieves the query types for a specified data type.

File

./facets.api.php, line 24
Hooks provided by the Facets module.

Code

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';
  }
}