search_touch_node

Versions
6 – 7
search_touch_node($nid)

Change a node's changed timestamp to 'now' to force reindexing.

Parameters

$nid The nid of the node that needs reindexing.

▾ 3 functions call search_touch_node()

search_comment in modules/search/search.module
Implementation of hook_comment().
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_nodeapi in modules/search/search.module
Implementation of hook_nodeapi().

Code

modules/search/search.module, line 623

<?php
function search_touch_node($nid) {
  db_query("UPDATE {search_dataset} SET reindex = %d WHERE sid = %d AND type = 'node'", time(), $nid);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.