Opt-in Weaviate multi-tenancy, vector compression, and advanced index options#38215
Draft
dudanogueira wants to merge 2 commits into
Draft
Opt-in Weaviate multi-tenancy, vector compression, and advanced index options#38215dudanogueira wants to merge 2 commits into
dudanogueira wants to merge 2 commits into
Conversation
- Bump image to cr.weaviate.io/semitechnologies/weaviate:1.38.1 across docker-compose.yaml, docker-compose.middleware.yaml, and the template - Bump weaviate-client 4.20.5 -> 4.22.0 (vdb-weaviate package + uv.lock) - Add missing WEAVIATE_GRPC_ENDPOINT / EXPOSE_WEAVIATE_GRPC_PORT entries to api/.env.example, integration test env, and middleware.env.example
… options Adds backward-compatible, default-off options to the Weaviate vector backend: - Multi-tenancy (WEAVIATE_MULTI_TENANCY_ENABLED): new datasets sharing an embedding model are stored as isolated tenants in one shared collection (tenant = dataset id) instead of one collection per dataset. Existing datasets keep their persisted layout; the layout is recorded in index_struct. - Vector compression (WEAVIATE_COMPRESSION): rq | pq | bq | sq with tuning knobs; flat index restricted to bq. - Index type (WEAVIATE_INDEX_TYPE): hnsw | flat | dynamic, plus WEAVIATE_DYNAMIC_INDEX_THRESHOLD and WEAVIATE_DISTANCE_METRIC. Dynamic index requires ASYNC_INDEXING on the server; added ASYNC_INDEXING env to the compose files (default off) and a clear error hint. - Optional WEAVIATE_REPLICATION_FACTOR. All data operations are routed through a tenant-scoped collection helper; tenant create/remove is handled on delete and collection creation. Adds 25 unit tests covering index/compression building, the flat+non-BQ constraint, tenant scoping, and factory layout selection; existing tests updated for the new surface.
2140c2a to
d1670f6
Compare
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.
Summary
Adds opt-in, default-off options to the Weaviate vector backend: native multi-tenancy, vector compression, and configurable index type / distance metric. Existing behavior is unchanged when the flags are off, and existing datasets keep their persisted layout.
WEAVIATE_MULTI_TENANCY_ENABLED): new datasets sharing an embedding model are stored as isolated tenants in one shared collection (tenant = dataset id) instead of one collection per dataset. The chosen layout is persisted inindex_struct, so existing datasets are never silently migrated.WEAVIATE_COMPRESSION):rq | pq | bq | sqwith tuning knobs; a flat index is restricted tobq.WEAVIATE_INDEX_TYPE):hnsw | flat | dynamic, plusWEAVIATE_DYNAMIC_INDEX_THRESHOLDandWEAVIATE_DISTANCE_METRIC. Dynamic index requiresASYNC_INDEXING=trueon the server (added to the compose files, default off) with a clear error hint.WEAVIATE_REPLICATION_FACTOR.All data operations are routed through a tenant-scoped collection helper; tenant create/remove is handled on collection creation and delete.
Fixes #38212
Screenshots
Checklist
make lint && make type-check(backend) — both pass. Frontendpnpm exec vp stagedN/A (no frontend changes).From Claude Code