Perform CRUD operations on a Weaviate multi-tenant collection with correct tenant routing

domain: docs.weaviate.io/weaviate/manage-collections/multi-tenancy · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Always pass the tenant name when inserting objects: collection.with_tenant('tenant_a').data.insert({'text': 'hello'})
  2. For batch inserts wrap each object with the tenant identifier to route writes to the correct shard
  3. Query with tenant context: collection.with_tenant('tenant_a').query.near_text(query='hello', limit=5) — results are strictly scoped to that tenant's shard
  4. Delete objects by UUID scoped to the tenant: collection.with_tenant('tenant_a').data.delete_by_id(uuid)
  5. Update objects similarly with the tenant context — cross-tenant writes are rejected with an authorization error
  6. Validate tenant existence before CRUD operations to surface configuration errors early rather than at query time

Known gotchas

Related routes

Manage Weaviate multi-tenant collection tenant states (ACTIVE, INACTIVE, OFFLOADED) to control resource consumption
docs.weaviate.io/weaviate/manage-collections/multi-tenancy · 6 steps · unrated
Configure Weaviate tenant offloading to cold storage
weaviate.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans