You are here

function apachesolr_attachments_apachesolr_document_handlers in Apache Solr Attachments 6.2

Implementation of hook_apachesolr_document_handlers().

Parameters

string $type: Entity type. 'node', 'comment', and so forth. Used to evaluate whether this module should be interested in creating documents.

string $namespace: Usually the name of the module that is initiating indexing. In this case we want to register a handler if the namespace is 'apachesolr_search'.

Return value

array $handlers An array of strings that are function names. Each function returns a $document from an entity (of type $type).

File

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

Code

function apachesolr_attachments_apachesolr_document_handlers($type, $namespace) {
  if ($type == 'node' && $namespace == 'apachesolr_attachments') {
    return array(
      'apachesolr_attachments_add_documents',
    );
  }
}