Has this hook been dropped in the 7x branch? Is there an alternative?

Thanks for your help in advance...

--Kevin

Comments

nick_vh’s picture

Status: Active » Fixed

Copied this straight from the api document in the module :-) Please update the documentation on drupal.org to reflect this

/**
 * Build the documents before sending them to Solr.
 * The function is the follow-up for apachesolr_update_index
 *
 * @param integer $document_id
 * @param array $entity
 * @param string $entity_type
 */
function hook_apachesolr_index_document_build(ApacheSolrDocument $document, $entity, $entity_type, $env_id) {

}

/**
 * Build the documents before sending them to Solr.
 *
 * Supports all types of
 * hook_apachesolr_index_document_build_' . $entity_type($documents[$id], $entity, $env_id);
 *
 * The function is the follow-up for apachesolr_update_index but then for
 * specific entity types
 *
 * @param $document
 * @param $entity
 * @param $entity_type
 */
function hook_apachesolr_index_document_build_ENTITY_TYPE(ApacheSolrDocument $document, $entity, $env_id) {
  // Index book module data.
  if (!empty($entity->book['bid'])) {
    // Hard-coded - must change if apachesolr_index_key() changes.
    $document->is_book_bid = (int) $entity->book['bid'];
  }
}
kevishie’s picture

Not sure how I missed that... thanks for your quick response! You rock..

nick_vh’s picture

Status: Fixed » Closed (fixed)