facets-8.x-1.x-dev/tests/facets_processors_collection/facets_processors_collection.module
tests/facets_processors_collection/facets_processors_collection.module
<?php
/**
* @file
* The facets processors collection module.
*/
/**
* Implements hook_facets_search_api_query_type_mapping_alter().
*/
function facets_processors_collection_facets_search_api_query_type_mapping_alter($backend_plugin_id, array &$query_types) {
if (
!empty($query_types['string'])
&& $query_types['string'] === 'search_api_string'
&& \Drupal::state()->get('facets_processors_collection_alter_string_query_handler', FALSE)
) {
$query_types['string'] = 'search_api_string_cached';
}
}
