function search_touch_node

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

Parameters

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

10 calls to search_touch_node()
hook_comment_insert in drupal/core/modules/comment/comment.api.php
Respond to creation of a new comment.
hook_comment_update in drupal/core/modules/comment/comment.api.php
Respond to updates to a comment.
SearchCommentTest::assertCommentAccess in drupal/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
Update search index and search for comment.
search_comment_delete in drupal/core/modules/search/search.module
Implements hook_comment_delete().
search_comment_insert in drupal/core/modules/search/search.module
Implements hook_comment_insert().

... See full list

File

drupal/core/modules/search/search.module, line 779
Enables site-wide keyword searching.

Code

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