function tca_node_apachesolr_exclude in Token Content Access 7
Implements hook_apachesolr_exclude().
File
- tca_node/
tca_node.module, line 168 - Main module file for Token Content Access nodes module.
Code
function tca_node_apachesolr_exclude($entity_id, $entity_type, $row, $env_id) {
if ($entity_type == 'node') {
// If TCA is active for this node, then exclude from the search.
$exclude_search = db_query('SELECT tca_active FROM {node} WHERE nid = :nid AND tca_active = 1', array(
':nid' => $entity_id,
))
->fetchColumn();
// Remove from index.
if ($exclude_search) {
return TRUE;
}
return FALSE;
}
}