You are here

function hook_apachesolr_exclude in Apache Solr Search 7

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

This is invoked for each entity that is being inspected to be added to the index. if any module returns TRUE, the entity is skipped for indexing.

Parameters

string $entity_id:

string $entity_type:

object $row: A complete set of data from the indexing table.

string $env_id: The machine name of the environment.

Return value

boolean

1 invocation of hook_apachesolr_exclude()
apachesolr_index_entities_document in ./apachesolr.index.inc
Convert a certain entity from the apachesolr index table to a set of documents. 1 entity can be converted in multiple documents if the apachesolr_index_entity_to_documents decides to do so.

File

./apachesolr.api.php, line 261
Exposed Hooks in 7.x:

Code

function hook_apachesolr_exclude($entity_id, $entity_type, $row, $env_id) {

  // Never index media entities to core_1
  if ($entity_type == 'media' && $env_id == 'core_1') {
    return TRUE;
  }
  return FALSE;
}