You are here

function hook_apachesolr_process_results in Apache Solr Search 7

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

This is invoked by apachesolr_search.module for the whole result set 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 351
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'],
    ));
  }
}