function apachesolr_user_result in Apachesolr User 7
Callback function for user search results.
Parameters
stdClass $doc: The result document from Apache Solr.
array $result: The result array for this record to which to add.
1 string reference to 'apachesolr_user_result'
- apachesolr_user_apachesolr_entity_info_alter in ./
apachesolr_user.module - @file Indexer for the user entities for the Apachesolr module.
File
- ./
apachesolr_user.module, line 175 - Indexer for the user entities for the Apachesolr module.
Code
function apachesolr_user_result($doc, &$result, &$extra) {
//not good performance, but the results look good.
$user = user_load($doc->entity_id);
if ($user) {
$user_profile = user_view($user, 'search_result');
$result['snippet'] = drupal_render($user_profile);
}
}