You are here

function hook_search_api_results_TAG_alter in Search API 8

Alter the result set of a search query with a specific tag.

The hook is invoked after all enabled processors have postprocessed the results.

Parameters

\Drupal\search_api\Query\ResultSetInterface $results: The search results to alter.

Deprecated

in search_api:8.x-1.14 and is removed from search_api:2.0.0. Please use the "search_api.processing_results.TAG" event instead.

See also

https://www.drupal.org/node/3059866

1 function implements hook_search_api_results_TAG_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_api_test_hooks_search_api_results_andrew_hill_alter in tests/search_api_test_hooks/search_api_test_hooks.module
Implements hook_search_api_results_TAG_alter().

File

./search_api.api.php, line 408
Hooks provided by the Search API module.

Code

function hook_search_api_results_TAG_alter(\Drupal\search_api\Query\ResultSetInterface &$results) {
  $results
    ->setExtraData('example_hook_invoked', microtime(TRUE));
}