You are here

function auto_index_nodeapi in Auto Index 6

@file Auto-index: Automatically indexes node content on update.

Uses Drupal's search module to automatically index updated nodes as and when they are updated. This means that a user can update node content and that content is immediately searchable, by users of the site.

@author Steve Osguthorpe <steve@futurate.com>

File

./auto_index.module, line 14
Auto-index: Automatically indexes node content on update.

Code

function auto_index_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case "delete":

      // Update search totals to reflect deleted node content.
      search_update_totals();
      break;
    case "update":
    case "insert":
      _auto_index_index_node($node);
      break;
  }
}