function hook_search_api_solr_search_results_alter in Search API Solr 7
Same name and namespace in other branches
- 8.3 search_api_solr.api.php \hook_search_api_solr_search_results_alter()
- 8 search_api_solr.api.php \hook_search_api_solr_search_results_alter()
- 8.2 search_api_solr.api.php \hook_search_api_solr_search_results_alter()
- 4.x search_api_solr.api.php \hook_search_api_solr_search_results_alter()
Lets modules alter the search results returned from a Solr search.
Parameters
array $results: The results array that will be returned for the search.
SearchApiQueryInterface $query: The SearchApiQueryInterface object representing the executed search query.
object $response: The Solr response object.
1 invocation of hook_search_api_solr_search_results_alter()
- SearchApiSolrService::search in includes/
service.inc - Executes a search on the server represented by this object.
File
- ./
search_api_solr.api.php, line 77 - Hooks provided by the Search API Solr search module.
Code
function hook_search_api_solr_search_results_alter(array &$results, SearchApiQueryInterface $query, $response) {
if (isset($response->facet_counts->facet_fields->custom_field)) {
// Do something with $results.
}
}