W3cubDocs

/Drupal 8

function node_reindex_node_search

node_reindex_node_search($nid)

Marks a node to be re-indexed by the node_search plugin.

Parameters

int $nid: The node ID.

File

core/modules/node/node.module, line 1327
The core module that allows content to be submitted to the site.

Code

function node_reindex_node_search($nid) {
  if (\Drupal::moduleHandler()->moduleExists('search')) {
    // Reindex node context indexed by the node module search plugin.
    search_mark_for_reindex('node_search', $nid);
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!node!node.module/function/node_reindex_node_search/8.1.x