You are here

function hook_apachesolr_process_results in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.api.php \hook_apachesolr_process_results()
  2. 7 apachesolr.api.php \hook_apachesolr_process_results()

This is invoked by apachesolr_search.module for the whole resultset returned in a search.

Parameters

array $results: The returned search results.

DrupalSolrQueryInterface $query: The query for which we want to process the results from

1 invocation of hook_apachesolr_process_results()
apachesolr_search_process_response in ./apachesolr_search.module

File

./apachesolr.api.php, line 331
Exposed Hooks in 7.x:

Code

function hook_apachesolr_process_results(array &$results, DrupalSolrQueryInterface $query) {
  foreach ($results as $id => $result) {
    $results[$id]['title'] = t('[Result] !title', array(
      '!title' => $result['title'],
    ));
  }
}