Operate Embedding Migrations Without Breaking Search
November 25, 2026 · 7 min read

Embedding models are infrastructure dependencies disguised as application components. Replacing one can change vector dimensions, similarity distributions, language coverage, latency, and retrieval rankings—even when the underlying documents remain unchanged.
That makes an embedding upgrade closer to a database migration than a model configuration change. At scale, the hard problem is not generating new vectors. It is moving a live retrieval system between two semantic coordinate spaces without corrupting results, overwhelming downstream systems, or losing the ability to roll back.
Why embedding migrations fail
Teams often begin with a simple plan: select a better model, re-embed the corpus, replace the index, and deploy. Each step sounds mechanical. The risk lies in the interactions.
Vectors from different models are generally not comparable. Even when dimensions match, their coordinate systems and score distributions differ. A query embedded by the new model should not search an index built with the old one. Mixing versions can produce plausible but effectively random rankings.
Operational failures are just as common. Re-embedding millions of documents can saturate model endpoints, consume database write capacity, trigger rate limits, and compete with live ingestion. Meanwhile, documents continue to change. A bulk migration that ignores concurrent updates may launch with stale or missing records.
Treat the migration as a versioned data pipeline with explicit consistency rules.
Define the migration contract first
Before creating vectors, document what must remain true throughout the transition. The contract should cover more than index availability.
At minimum, specify:
- Which embedding version owns each index or collection
- How document IDs map across old and new indexes
- Whether both indexes receive live updates during migration
- Which metadata fields and filters must remain equivalent
- How deletions propagate to both versions
- Which query path is authoritative at each phase
- What conditions trigger rollback
- How long the old index will be retained
Store the embedding model identifier, dimensions, preprocessing version, and source-content checksum with every vector record or manifest entry. Names such as embeddings_v2 are insufficient. Use immutable identifiers that distinguish provider, model revision, chunking logic, and normalization behavior.
A vector is derived data. You should always be able to explain which source content and transformation produced it.
Build parallel indexes, not mixed indexes
Do not update vectors in place unless the system is small enough for a controlled outage and full rebuild. A production migration should create a separate index for the new embedding version.
Parallel indexes provide three essential properties: isolation, measurable comparison, and fast rollback. They also prevent old query vectors from being compared with new document vectors during a partially completed rebuild.
The application should route each request through a versioned retrieval path:
- Embed the query with a specific model version.
- Search only the corresponding index.
- Apply that version’s score interpretation and retrieval settings.
- Record the version in traces and result logs.
Avoid a global environment variable that silently switches model and index independently. Use one versioned configuration object that binds the query model, index name, distance metric, filtering schema, and reranking configuration together. Deploying an invalid combination should fail validation before traffic reaches it.
Backfill without losing live changes
A large corpus cannot usually be re-embedded atomically. The migration must reconcile a historical backfill with documents created, edited, or deleted while that backfill runs.
One reliable pattern has three stages.
First, capture a high-water mark from the source system, such as an event offset, transaction ID, or timestamp with deterministic tie-breaking. Backfill all records at or before that point into the new index.
Second, dual-write subsequent source changes to both embedding pipelines. If synchronous dual-writing would add unacceptable latency, publish durable change events and let version-specific consumers process them independently.
Third, replay changes after the high-water mark and reconcile until the new index catches up. Do not declare completion based only on job success. Compare source IDs, checksums, deletion markers, and embedding versions.
Make every operation idempotent. Retries should upsert the same vector record rather than create duplicates. Deletion events need equal treatment; forgotten deletions are a frequent source of privacy and relevance defects.
Control migration load explicitly
Embedding backfills generate bursty pressure across several systems: source storage, chunking workers, model APIs, vector databases, and observability pipelines. Unlimited concurrency merely moves the bottleneck until something fails.
Set separate budgets for:
- Source reads per second
- Tokens or embedding requests per minute
- Concurrent chunking jobs
- Vector upsert batch size and throughput
- Retry volume
- Live-ingestion lag
Prioritize current user-facing updates over historical backfill. A practical scheduler reserves capacity for live traffic and uses only the remaining budget for migration work. If queue lag or query latency crosses a threshold, throttle the backfill automatically.
Checkpoint at stable boundaries, such as document partitions or event offsets. A worker restart should resume from verified progress, not restart a multi-day batch. Dead-letter records that repeatedly fail, but keep their identifiers visible in reconciliation reports. Silent omission is worse than a delayed migration.
Compare retrieval behavior, not cosine scores
Raw similarity scores are not portable across embedding models. A score of 0.78 from one model may represent a very different relevance level in another. Copying thresholds from the old system can either suppress useful results or admit large amounts of noise.
Evaluate the new path using production-shaped queries and ranking outcomes. Maintain a judged query set that includes common intents, rare terminology, multilingual inputs, short ambiguous queries, and cases requiring metadata filters.
Useful offline measures include recall at k, normalized discounted cumulative gain, mean reciprocal rank, and zero-result rate. Segment them by query type and tenant rather than relying on one average.
Offline evaluation is necessary but incomplete. Shadow real queries to both paths without exposing new results to users. Log result IDs, ranks, latency, filter behavior, and downstream reranker decisions. Investigate disagreements, especially when the new model drops documents that historically led to successful outcomes.
Human review should focus on meaningful deltas rather than random samples. Ask reviewers to compare top results blindly and explain failure modes. Those explanations often reveal chunking, metadata, or domain-language problems that aggregate metrics hide.
Release with reversible traffic steps
Once backfill, reconciliation, and shadow evaluation pass, introduce live traffic gradually. Route a small percentage of eligible requests to the new retrieval version while keeping the old path available.
Watch both system and product indicators:
- Query and embedding latency
- Vector database errors and timeouts
- Empty-result and fallback rates
- Click, selection, or task-completion signals
- Reranker confidence and answer-grounding measures
- Performance by language, tenant, and query category
Increase traffic in explicit stages. Hold each stage long enough to observe normal workload cycles. A migration that looks healthy during office hours may fail under nightly ingestion or regional traffic peaks.
Rollback should be a routing change, not an emergency rebuild. Keep the old index current during the canary period, and retain it until the new path has met stability targets for an agreed window. If dual-writing is expensive, price it as migration insurance rather than treating it as waste.
Plan for index lifecycle and cost
Parallel operation temporarily doubles vector storage and may increase embedding, network, and observability costs. Estimate that cost before migration begins, including replicas, backups, and metadata overhead—not only raw vector size.
Define deletion dates and owners for obsolete assets. Old indexes have a habit of becoming permanent because nobody knows whether they are safe to remove. Require evidence that rollback windows have closed, audit obligations are satisfied, and no services still read the old version.
Retain compact manifests after deleting the index. They should record model versions, source ranges, validation results, release dates, and approval decisions. This preserves operational history without paying indefinitely for searchable vectors.
Short takeaway
An embedding change is a derived-data migration across incompatible semantic spaces. Build a parallel index, keep live updates consistent, evaluate rankings rather than scores, and shift traffic through reversible stages. The winning design is not the one that re-embeds fastest. It is the one that can prove completeness, detect relevance regressions, and roll back safely.