function hook_google_appliance_response_alter in Google Search Appliance 8
Alter Google Search Appliance results.
This hook is invoked after the search appliance returns with a response and the Google Search Appliance module does its basic parsing.
Use this to make result alterations that are inappropriate at the theme level.
Parameters
\Drupal\google_appliance\SearchResults\ResultSet $results: The search results.
See also
\Drupal\google_appliance\Service\Search::search
Related topics
1 invocation of hook_google_appliance_response_alter()
- Search::search in src/
Service/ Search.php - Performs search.
File
- ./
google_appliance.api.php, line 67 - Hook documentation.
Code
function hook_google_appliance_response_alter(ResultSet $results) {
$results
->addSynonym(new Synonym('Foo', 'foo'));
}