function apachesolr_index_entities_document in Apache Solr Search 6.3
Same name and namespace in other branches
- 8 apachesolr.index.inc \apachesolr_index_entities_document()
- 7 apachesolr.index.inc \apachesolr_index_entities_document()
1 call to apachesolr_index_entities_document()
- apachesolr_index_entities in ./apachesolr.index.inc
- Processes all index queues associated with the passed environment.
File
- ./apachesolr.index.inc, line 75
- Functions related to Apache Solr indexing operations.
Code
function apachesolr_index_entities_document($row, $entity_type, $env_id) {
$documents = array();
if (!empty($row->status)) {
$build_document = TRUE;
foreach (module_implements('apachesolr_exclude') as $module) {
$exclude = module_invoke($module, 'apachesolr_exclude', $row->entity_id, $entity_type, $row, $env_id);
if (!empty($exclude)) {
$build_document = FALSE;
}
}
foreach (module_implements('apachesolr_' . $entity_type . '_exclude') as $module) {
$exclude = module_invoke($module, 'apachesolr_' . $entity_type . '_exclude', $row->entity_id, $row, $env_id);
if (!empty($exclude)) {
$build_document = FALSE;
}
}
if ($build_document) {
$documents = array_merge($documents, apachesolr_index_entity_to_documents($row, $env_id));
}
}
else {
apachesolr_remove_entity($env_id, $row->entity_type, $row->entity_id);
}
return $documents;
}