vsr
The Vertex AI Search Recrawl module automatically notifies Google Vertex AI Search (Discovery Engine) to recrawl your Drupal content whenever a node is created, updated, or deleted — keeping your search index always in sync with your site.
How it works
When a node is saved or deleted, the module fires a recrawl request to the Google Discovery Engine API using a service account JWT authentication. Google then crawls the affected URL and updates its search index accordingly. When a node is deleted, the crawl returns a 404 response, which signals Google to automatically remove that page from the search index.
Features
- Automatically triggers recrawl on node insert, update, and delete
- Removes deleted pages from the Vertex AI Search index via 404 detection
- Simple admin configuration form at Admin → Configuration → Search → Vertex Search Recrawl
- Supports filtering by node type so you control which content gets indexed
- Uses secure JWT / OAuth 2.0 authentication with your Google service account
- Logs all recrawl activity to Drupal's watchdog for easy debugging
- Falls back to native Drupal hooks if hook_event_dispatcher is not installed
- Compatible with Drupal 10 and 11
Requirements
- A Google Cloud project with the Discovery Engine API enabled
- A Google Cloud service account with the Discovery Engine Editor role
- A Vertex AI Search data store of type Website (Advanced)
Configuration
Go to Admin → Configuration → Search → Vertex Search Recrawl
Enter your GCP Project ID
Enter your Data Store ID
Enter the file path to your service account JSON key file
Save — the module will immediately begin triggering recrawls on node save and delete
Use case
This module is ideal for Drupal sites that use Google Vertex AI Search as their search backend and need their search index to reflect content changes in real time, without waiting for Google's scheduled crawl cycle.