I'm not sure if the keywords field is a reference field (term or node entity). Please update the array key from the example, I used term reference as example
$term->field_keywords[LANGUAGE_NONE][0][tid]
Please try this, in your mymodule.module:
function mymodule_apachesolr_index_document_build(ApacheSolrDocument $document, $entity, $entity_type) {
// I think you should do a foreach here, since you are using multi-valued field.
foreach ($entity->field_keywords[LANGUAGE_NONE] as $key => $val) {
$tid = $val['tid'];
// The 1st letter indicates the data type and the last letter is
// 'm' for multi-valued.
$document->addField('im_field_keywords', $tid);
}
}
function mymodule_apachesolr_query_alter(DrupalSolrQueryInterface $query) {
$query->addParam('fl', 'im_field_keywords');
}
Then, prepare the variable.
/**
* Implements hook_apachesolr_process_results().
*/
function mymodule_apachesolr_process_results(&$results) {
foreach ($results as $key => &$result) {
$result['foo'] = $result['node']->im_field_keywords;
}
}
Call this variable in you search-result.tpl.php
e.g.
<?php print $result['foo']; ?>
I hope it helps.