Example #1
0
/**
 * The comment is being updated.
 *
 * @param $comment
 *   The comment object.
 */
function hook_comment_update($comment)
{
    // Reindex the node when comments are updated.
    search_touch_node($comment->nid);
}
Example #2
0
/**
 * The comment is being updated.
 *
 * @param $form_values
 *   Passes in an array of form values submitted by the user.
 * @return
 *   Nothing.
 */
function hook_comment_update($form_values)
{
    // Reindex the node when comments are updated.
    search_touch_node($form_values['nid']);
}
Example #3
0
 /**
  * @Given /^I update search index for "([^"]*)"$/
  */
 public function iUpdateSearchIndexFor($node_title)
 {
     // We want to find both campaigns and card art.
     $nodes = db_select('node')->fields('node', ['nid'])->condition('title', $node_title)->condition('type', ['card_art', 'campaign'])->execute();
     foreach ($nodes as $node) {
         search_touch_node($node->nid);
         _node_index_node($node);
         search_update_totals();
     }
 }