Prerequisites
- Search has just switched vector space: you activated another ingestion plugin, promoted another space of the same plugin, or rolled either back.
curlandjq(curl --version,jq --version), your API address inQUIVR_API_URL, and a key withmonitoring:readandmonitoring:writeinQUIVR_ALERT_KEY.- A label unique to this migration in
MIGRATION_ID, such as the new space id followed by today’s date. The requests use it only to build idempotency keys, so a later switch back to a space you used before still gets fresh keys. - Your application’s inventory of alerts that use
meaning_check: vectors. The API cannot list Saved Queries.
Steps
1
Create a new Saved Query Version
For every Saved Query using Save its returned
meaning_check: vectors in the affected Corpora, create a new Version after search switched space. Set SAVED_QUERY_ID to its id from your application’s alert inventory. Preserve its definition:version_id as QUERY_VERSION_ID.2
Move each Subscription to it
For each Subscription of this Saved Query, set The query Version must still be that Saved Query’s current Version. Finish its Subscription migrations before creating another query Version. Replaying the same key and body returns the same Version; a changed body conflicts. Subscription edits preserve enabled state and affect future changes from their commit, without replaying past documents or rewriting existing Matches.Use your application’s inventory to include disabled Subscriptions before re-enabling them. The Subscription API requires an owner filter and lists only enabled, non-deleted items; follow all pages for each owner and list global Subscriptions separately with
SUBSCRIPTION_ID and create a new Version, retaining its evaluator settings and destination:owner=none. Gather Saved Query ids from those lists or your inventory.3
Recalibrate the threshold
Similarity scores from different models are not comparable, so the copied threshold may now catch too much or too little. Tune it on your own examples; Meaning alerts explains vector matching and its threshold. To apply a new value, repeat the previous step with a new idempotency key in
subscription-version.json and the value in its evaluator.configuration.threshold, between 0.2 and 0.95.Check it worked
Read each migrated Subscription and check thatcurrent_version.saved_query_version_id is the new query Version:
After a rollback
The migrations do not reverse themselves. Immediately after a rollback, set a newMIGRATION_ID and repeat these steps.
Clean up
Delete the localquery-version.json and subscription-version.json files. Stored alert Versions and Matches remain readable.
Next
- Try and switch a vector model to finish checking the switch.
- Upgrade an alert rule to move alerts to a new version of the alerts plugin, a separate task.