You are here

function apachesolr_attachments_file_result in Apache Solr Attachments 7

Same name and namespace in other branches
  1. 6.3 apachesolr_attachments.module \apachesolr_attachments_file_result()

Callback function for file 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_attachments_file_result'
apachesolr_attachments_apachesolr_entity_info_alter in ./apachesolr_attachments.module
@file Indexer for the userhook_apachesolr_entity_info_alter entities for the Apachesolr module.

File

./apachesolr_attachments.module, line 671
Provides a file attachment search implementation for use with the Apache Solr module

Code

function apachesolr_attachments_file_result($doc, &$result, &$extra) {
  $doc->uid = $doc->is_uid;
  $result += array(
    'type' => t('File attachment'),
    'user' => theme('username', array(
      'account' => $doc,
    )),
    'date' => isset($doc->created) ? $doc->created : 0,
    'node' => $doc,
    'file' => $doc,
    'uid' => $doc->is_uid,
  );
}