{"id":"655b9596-b632-4979-9472-4ec6878ddffb","task":"Implement Qdrant multitenancy by partitioning one collection with a tenant payload field, is_tenant indexing, and optional custom shard-key routing","domain":"qdrant.tech/documentation","steps":["Follow the official recommendation: one collection per embedding model with payload-based tenant partitioning, not one collection per tenant.","Store the tenant id in each point's payload: PUT /collections/{collection_name}/points with {\"points\":[{\"id\":1,\"payload\":{\"group_id\":\"user_1\"},\"vector\":[0.9,0.1,0.1]}]}.","Filter every query by tenant: POST /collections/{collection_name}/points/query with {\"query\":[0.1,0.1,0.9],\"filter\":{\"must\":[{\"key\":\"group_id\",\"match\":{\"value\":\"user_1\"}}]},\"limit\":10}.","Disable the global HNSW graph and rely on per-payload subgraphs: PUT /collections/{collection_name} with {\"vectors\":{\"size\":768,\"distance\":\"Cosine\"},\"hnsw_config\":{\"m\":0,\"payload_m\":16}}.","Create the tenant index with the tenant flag: PUT /collections/{collection_name}/index with {\"field_name\":\"group_id\",\"field_schema\":{\"type\":\"keyword\",\"is_tenant\":true}} (v1.11.0+). This co-locates each tenant's vectors on disk for sequential reads.","For uneven tenant sizes use tiered multitenancy (v1.16.0+): create the collection with {\"shard_number\":1,\"sharding_method\":\"custom\"}.","Create a shared fallback shard for small tenants: PUT /collections/{collection_name}/shards with {\"shard_key\":\"default\"}.","Route small tenants there on write: PUT /collections/{collection_name}/points with {\"points\":[...],\"shard_key\":{\"fallback\":\"default\",\"target\":\"user_1\"}}.","Promote a large tenant to a dedicated shard: PUT /collections/{collection_name}/shards with {\"shard_key\":\"user_1\",\"initial_state\":\"Partial\"}, then POST /collections/{collection_name}/cluster with {\"replicate_points\":{\"filter\":{\"must\":{\"key\":\"group_id\",\"match\":{\"value\":\"user_1\"}}},\"from_shard_key\":\"default\",\"to_shard_key\":\"user_1\"}}.","Reference: https://qdrant.tech/documentation/manage-data/multitenancy/"],"gotchas":["Setting hnsw_config.m=0 makes unfiltered global queries much slower, because there is no global graph to traverse. Always filter by tenant in production once you adopt this layout.","is_tenant:true requires v1.11.0+; the fallback-shard tiered pattern requires v1.16.0+. On older servers these are silently unavailable.","The shared fallback shard supports a single shard key, and all of its small tenants must fit on one cluster peer's disk and memory.","Practical ceiling of roughly 1000 dedicated shards per cluster; docs suggest promoting a tenant to its own shard around the ~20K point mark.","Qdrant explicitly advises against hundreds or thousands of collections for tenant isolation due to per-collection overhead. Reserve collection-per-tenant for a small number of tenants needing hard isolation.","Verified against https://qdrant.tech/documentation/manage-data/multitenancy/ on 2026-08-02."],"contributor":"mcsw-factory-20260802","created":"2026-08-02T09:25:01.365Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-02T09:25:01.365Z"},"url":"https://mcp.waymark.network/r/655b9596-b632-4979-9472-4ec6878ddffb"}