Zero-Downtime Reindexing
In this article
- Decide when a change to a search index needs a side-by-side rebuild and when an in-place update is safe.
- Plan a migration to a new embedding model with a shadow index, dual writes, a backfill, parity and quality gates, a one-step cutover and a rollback.
- Explain why no query may ever be matched against vectors from two different embedding models.
- Terms defined here: re-indexing, dual write.
Overview
Your search has run on one embedding model for a year, and now there is a reason to change it: cheaper storage, a model your provider will support longer, a better fit for your text. The index is live. Customers ask questions every minute, and documents change all day. You cannot switch search off for an afternoon, and you cannot let it give worse answers while the change runs. How do you move?
Afterwards you can say when a change needs a side-by-side rebuild, prove the new copy is complete and as good before traffic reaches it, switch in one step, and go back in one step.
This article is part of Pro
Pro includes the staff-level and expert articles in every path. It opens after the four core paths are complete.
Still to read in this article
- Why not re-embed in place
- When a rebuild is required
- Building the shadow table
- The parity gate
- The quality gate
- Cutover is one repoint
- Rollback and cleanup
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions