You are here

function hook_apachesolr_exclude in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr.api.php \hook_apachesolr_exclude()
  2. 7 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

integer $entity_id:

string $entity_type:

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

string $env_id:

Return value

boolean

1 invocation of hook_apachesolr_exclude()
apachesolr_index_entities_document in ./apachesolr.index.inc

File

./apachesolr.api.php, line 232
Exposed Hooks in 6.x-3.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;
}