search_touch_node

  1. drupal
    1. 8
    2. 6
    3. 7
Versions
8 – 7 search_touch_node($nid)

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

Parameters

$nid The node ID of the node that needs reindexing.

▾ 10 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.
SearchCommentTestCase::checkCommentAccess in modules/search/search.test
Update search index and search for comment.
search_comment_delete in modules/search/search.module
Implements hook_comment_delete().
search_comment_insert in modules/search/search.module
Implements hook_comment_insert().
search_comment_publish in modules/search/search.module
Implements hook_comment_publish().
search_comment_unpublish in modules/search/search.module
Implements hook_comment_unpublish().
search_comment_update in modules/search/search.module
Implements 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
Implements hook_node_update().

Code

modules/search/search.module, line 783

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