You are here

function apachesolr_commentsearch_apachesolr_document_handlers in Apache Solr Search 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

contrib/apachesolr_commentsearch/apachesolr_commentsearch.module, line 17

Code

function apachesolr_commentsearch_apachesolr_document_handlers($type, $namespace) {
  if ($type == 'node' && $namespace == 'apachesolr_search') {
    return array(
      'apachesolr_commentsearch_node_to_comments',
    );
  }
}