Problem/Motivation
Currently, content indexing only happens when an admin manually clicks the "Re-index Content" button on the settings page. This means:
New content is not available in the chatbot until someone manually re-indexes
Updated content shows stale information in chatbot responses
Deleted or unpublished content may still appear in chatbot answers
Site editors have no way of knowing the index is outdated
Proposed resolution
Use Drupal entity hooks (hook_entity_insert, hook_entity_update, hook_entity_delete) to automatically update the index when content changes:
Node created: If it belongs to a configured content type and is published, index it immediately
Node updated: Update its index entry with the latest content. If unpublished, remove from index
Node deleted: Remove from index
The manual "Re-index Content" button remains available for full re-indexing when needed (e.g., after changing which content types or fields are configured).
Remaining tasks
Test with bulk content operations (e.g., bulk publish/unpublish)
Consider using Queue API for large batch operations to avoid timeout issues
Issue fork 3569915-3573386
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
solimanharkas commented