Skip to content

Fix multivector config lost in CollectionConfig.to_dict() - #2196

Merged
Shah91n merged 1 commit into
mainfrom
fix/multivector-to-dict
Oct 9, 2026
Merged

Shah91n merged 1 commit into
mainfrom
fix/multivector-to-dict

Conversation

@Shah91n

@Shah91n Shah91n commented Oct 9, 2026

Copy link
Copy Markdown
Member

_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.

@Shah91n Shah91n self-assigned this Oct 9, 2026
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:39

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 multivector structure.
  • 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.

@Shah91n
Shah91n merged commit 3096307 into main Oct 9, 2026
126 of 129 checks passed
@Shah91n
Shah91n deleted the fix/multivector-to-dict branch October 9, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants