The node module of Drupal core is calling node_reindex_node_search() in \Drupal\node\Entity\Node::postSave() but that only triggers re-indexing of nodes that have been index by the node_search plugin. All the nodes that have been indexed by the search_exclude_node_search plugin will never be re-index when nodes get changed. I will be submitting a patch to fic this in a minute.

Comments

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Status: Active » Needs review
StatusFileSize
new3.33 KB

This patch triggers a re-index for all active search_exclude_node_search plugins when either a node has been updated or a comment for a node was added, changed or deleted. This is similar to what the core node module is doing as well.

danielveza’s picture

Status: Needs review » Reviewed & tested by the community

Happy to mark this as RTBC. Just applied and tested. Lets get this in!

  • DanielVeza committed 22cd572 on 8.x-1.x
    Issue #2925505 by jurgenhaas, DanielVeza: Re-indexing changed nodes is...
danielveza’s picture

Status: Reviewed & tested by the community » Fixed

Altered the comments slightly and added some typehints. Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.