You are here

function _apachesolr_nodeapi_delete in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr.module \_apachesolr_nodeapi_delete()

Helper function for hook_nodeapi().

1 call to _apachesolr_nodeapi_delete()
apachesolr_nodeapi in ./apachesolr.module
Implementation of hook_nodeapi().

File

./apachesolr.module, line 549
Integration with the Apache Solr search application.

Code

function _apachesolr_nodeapi_delete($node, $set_message = TRUE) {
  if (apachesolr_delete_node_from_index($node)) {

    // There was no exception, so delete from the table.
    db_query("DELETE FROM {apachesolr_search_node} WHERE nid = %d", $node->nid);
    if ($set_message && user_access('administer search') && variable_get('apachesolr_set_nodeapi_messages', 1)) {
      apachesolr_set_stats_message('Deleted content will be removed from the Apache Solr search index in approximately @autocommit_time.');
    }
  }
}