You are here

function hook_apachesolr_index_documents_alter in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr.api.php \hook_apachesolr_index_documents_alter()
  2. 7 apachesolr.api.php \hook_apachesolr_index_documents_alter()

Alter the prepared documents from one entity before sending them to Solr.

_type

Parameters

$documents: Array of ApacheSolrDocument objects.

$entity:

string $env_id:

1 invocation of hook_apachesolr_index_documents_alter()
apachesolr_convert_entity_to_documents in ./apachesolr.index.inc
The given entity is converted to an array via the callback specified in the entity type's info array. The array that the entity is converted to is the model of the document sent to the Apache Solr server for indexing. This function allows…

File

./apachesolr.api.php, line 406
Exposed Hooks in 6.x-3.x:

Code

function hook_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {

  // Do whatever altering you need here
}