I am using hook_apachesolr_exclude but its not working.I have created a custom field if that field is checked i want to exclude that node I wrote the given below code:
function a10_exclude_node_apachesolr_exclude($entity_id, $entity_type, $row, $env_id) {
$result_node = node_load( $entity_id );
if( isset( $result_node->field_exclude_from_search['und'][0]['value'] ) and $result_node->field_exclude_from_search['und'][0]['value'] == 1 ){
return TRUE;
}
return FALSE;
}
even when i am writing die inside the hook, hook is not invoking.Please let me know how i can check the above hook is invoking or working.I have also tried the Apache Solr Node Exclude module, when i am checking the node to exclude it does not come inside the result but when again i uncheck the node same result come there and when i uncheck the two or more nodes they do not exclude from search result.