Repository navigation
Fix multivector config lost in CollectionConfig.to_dict() - #2196
Merged
Merged
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The serialization fix matches the server schema and is adequately covered by focused round-trip tests.
0 open findings
What changed in this PR
Fixes exported collection configs so multi-vector indexes can be recreated correctly.
Changes:
- Serializes multi-vector settings using the server-compatible
multivectorstructure. - Adds round-trip tests for plain and MUVERA configurations.
| File | Description |
|---|---|
weaviate/collections/classes/config.py |
Corrects multi-vector serialization. |
test/collection/test_config_methods.py |
Tests multi-vector configuration preservation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tsmith023
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_VectorIndexConfig.to_dict() serialized multi-vector settings as "multiVector": {"aggregation": ..., "encoding": {...}}. The server expects "multivector": {"enabled": true, "aggregation": ..., "muvera": {...}}.
Why
recreating a collection from export_config().to_dict() with create_from_dict() silently builds regular vector indexes instead of multi-vector ones. Depending on the server, inserting multi-vectors then fails, or the inserts succeed and multi-vector search fails with provided vector is a multi vector but vector index supports regular vectors. Found while migrating a ColBERT-style collection between clusters.
###Change
emit multivector with enabled: true, and muvera when an encoding is set, the same way quantizers are already handled. Adds a round-trip test with and without MUVERA.
Test
Verified against Weaviate 1.40.0. I exported a collection with a plain multi-vector, a MUVERA multi-vector and a regular vector, recreated it on a second instance and copied 200 objects. Before the fix, both multi-vector indexes came back as regular and all inserts failed. After the fix, both are preserved and every vector's search returns the right object.