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.

▾ 9 functions call search_touch_node()

hook_comment_insert in modules/comment/comment.api.php
The comment is being inserted.
hook_comment_update in modules/comment/comment.api.php
The comment is being updated.
search_comment_delete in modules/search/search.module
Implement hook_comment_delete().
search_comment_insert in modules/search/search.module
Implement hook_comment_insert().
search_comment_publish in modules/search/search.module
Implement hook_comment_publish().
search_comment_unpublish in modules/search/search.module
Implement hook_comment_unpublish().
search_comment_update in modules/search/search.module
Implement hook_comment_update().
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_node_update in modules/search/search.module
Implement hook_node_update().

Code

modules/search/search.module, line 705

<?php
function search_touch_node($nid) {
  db_update('search_dataset')
    ->fields(array('reindex' => REQUEST_TIME))
    ->condition('type', 'node')
    ->condition('sid', $nid)
    ->execute();
}
?>
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.