function 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/ node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_delete() for comment entities.
- NodeSearchHooks::commentInsert in core/
modules/ node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_insert() for comment entities.
- NodeSearchHooks::commentUpdate in core/
modules/ node/ src/ Hook/ NodeSearchHooks.php - Implements hook_ENTITY_TYPE_update() for comment entities.
- NodeSearchHooks::nodeUpdate in core/
modules/ node/ src/ Hook/ NodeSearchHooks.php - Implements hook_node_update().
File
-
core/
modules/ node/ src/ Hook/ NodeSearchHooks.php, line 66
Class
- NodeSearchHooks
- Hook implementations for node entity operations.
Namespace
Drupal\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.