Operations & Deployment¶
What to run when — and how the bundle stays in sync with the sulu.ai platform.
Database Schema¶
The bundle adds its own tables (experts, intelligent-search feedback). Manage schema changes the same way as the rest of your project — ideally with Doctrine Migrations:
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
For local development, doctrine:schema:update --dump-sql --force works as a quick alternative, but migrations are the recommended path for staging and production.
Schema changes only occur when you install or upgrade the bundle — this is not a per-deployment task.
Expert Synchronization¶
php bin/console sulu:ai:synchronize-experts
Fetches all experts and their variants from the platform and stores them in the local database. Services included in your plan and add-ons are enabled by it.
When you need it:
- Once during the initial setup of an environment
- As a fallback when the webhook is not registered or was unavailable while your configuration changed on the platform
With a registered webhook, expert changes on the platform are pushed to your installation automatically — routine manual synchronization is not required.
Symptoms of a missing sync: AI actions missing in the admin, experts not appearing, or outdated variant lists.
Intelligent Search Ingestion¶
If Intelligent Search is enabled, the index keeps itself in sync with editorial work automatically — publishing, unpublishing, and deleting content updates the index (see Automatic Index Updates).
A manual run is only needed when:
- You add a new locale — existing content in that locale is not indexed yet
- Your URLs change (domain migration, scheme change) — re-ingest with
--host/--schemeso citations link correctly - You change the chunker configuration — rebuild with
--purge - Content was modified outside the normal publish flow (imports, scripts)
php bin/console sulu:ai:intelligent-search:ingest --locale=fr # new locale
php bin/console sulu:ai:intelligent-search:ingest --host=www.example.com --scheme=https
php bin/console sulu:ai:intelligent-search:ingest --purge # full rebuild
Webhook¶
The webhook keeps your installation in sync with the sulu.ai platform in real time — see the dedicated Webhooks page for registration and details.
Console Commands¶
| Command | Purpose |
|---|---|
sulu:ai:synchronize-experts |
Sync experts and variants from the platform (initial setup / fallback) |
sulu:ai:register-webhook |
Register the webhook endpoint; prints the secret once — see Webhooks |
sulu:ai:intelligent-search:ingest |
Index content for intelligent search — see Ingestion |
sulu:ai:intelligent-search:search |
Query intelligent search from the CLI — see Searching |
Common Pitfalls¶
- Bundle registration order — violations throw an exception during
cache:clear; see Getting Started. - Configuring
sulu_aidirectly — rejected with an exception; all configuration belongs undersulu_ai_platform. - Experts missing in a fresh environment — run the initial
sulu:ai:synchronize-expertsand register the webhook. - Lost webhook secret — it is shown only once; re-register to obtain a new one.