Embedding dimensions no longer match after changing models: how do you migrate the index?
After changing an embedding model, check the new vector length against the index field definition, then verify that documents and queries use the same model. Even equal dimensions do not make different models' vector spaces interchangeable.
Start troubleshooting here
After changing an embedding model, check the new vector length against the index field definition, then verify that documents and queries use the same model. Even equal dimensions do not make different models' vector spaces interchangeable. Usually, rebuild vectors in a separate index and validate comparisons before switching reads.
Check vector length and the model that produced it
Typical symptoms are dimension errors during insertion or unrelated results from queries that previously worked. Save one actual vector length and the index definition to locate the failure in generation, insertion or querying. Similar model names do not establish that old document vectors can be compared with new query vectors.
Inspect both document and query pipelines
Check the embedding service version and output-dimension configuration, then sample document records for vectors still produced by the old model. Document and query embeddings may use different programs or environment variables, so inspect both ends. Equal lengths are only a structural check; retain the model provenance for the same text in each pipeline.
Rebuild a separate index and switch queries with it
Create a separate field or index for the new model, retain the original for recovery and regenerate all vectors by document ID. Verify record counts and failed-item retries so migration does not silently omit documents. Switch the query embedding model with the target index; do not trim vectors to force a field-length match when the service provides no supported dimension setting.
Compare ranking and preserve a recovery path
Use fixed queries with known relevant documents to compare candidates and rankings, covering exact identifiers and natural-language descriptions. The absence of dimension errors is only the first check: verify migration completeness and correct citation-to-document mapping. Keep a recovery path after switching and inspect actual query anomalies.
This is an index-migration method, not a rebuild of your knowledge base or a claim that different models' similarity scores are comparable confidence measures. Models supporting variable dimensions still need explicit, consistent configuration at both ends. Regeneration may consume service allowances, so confirm resource requirements in the existing environment before migration.
Checked sources
These sources support the concepts and methods described here. Examples and test scope are labeled separately; check the version of the tools you use.