function search_touch_node

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/search/search.module \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-7.x/modules/comment/comment.api.php
The comment is being inserted.
hook_comment_update in drupal-7.x/modules/comment/comment.api.php
The comment is being updated.
SearchCommentTestCase::checkCommentAccess in drupal-7.x/modules/search/search.test
Update search index and search for comment.
search_comment_delete in drupal-7.x/modules/search/search.module
Implements hook_comment_delete().
search_comment_insert in drupal-7.x/modules/search/search.module
Implements hook_comment_insert().

... See full list

Archivo

drupal-7.x/modules/search/search.module, line 783
Enables site-wide keyword searching.

Código

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