function NodeSearchHooks::reindexNodeForSearch
Same name in this branch
- main core/modules/node/src/Hook/NodeSearchHooks.php \Drupal\node\Hook\NodeSearchHooks::reindexNodeForSearch()
Same name and namespace in other branches
- 11.x core/modules/node/src/Hook/NodeSearchHooks.php \Drupal\node\Hook\NodeSearchHooks::reindexNodeForSearch()
Reindex a node for search.
Parameters
string|int $nid: The node ID to reindex.
4 calls to NodeSearchHooks::reindexNodeForSearch()
- NodeSearchHooks::commentDelete in core/
modules/ search/ modules/ search_node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_delete() for comment entities.
- NodeSearchHooks::commentInsert in core/
modules/ search/ modules/ search_node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_insert() for comment entities.
- NodeSearchHooks::commentUpdate in core/
modules/ search/ modules/ search_node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_update() for comment entities.
- NodeSearchHooks::nodeUpdate in core/
modules/ search/ modules/ search_node/ src/ Hook/ NodeSearchHooks.php - Implements hook_node_update().
File
-
core/
modules/ search/ modules/ search_node/ src/ Hook/ NodeSearchHooks.php, line 133
Class
- NodeSearchHooks
- Search related hook implementations originally in the Node module.
Namespace
Drupal\search_node\HookCode
protected function reindexNodeForSearch(string|int $nid) : void {
// Reindex node context indexed by the node module search plugin.
$this->searchIndex?->markForReindex('node_search', (int) $nid);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.