From cc0e5c9b582f57b5ea98512a5c101b6b847efff8 Mon Sep 17 00:00:00 2001 From: George Panchuk Date: Tue, 13 Feb 2024 11:05:38 +0100 Subject: [PATCH 1/3] fix: fix shard key creation --- qdrant-landing/content/articles/multitenancy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qdrant-landing/content/articles/multitenancy.md b/qdrant-landing/content/articles/multitenancy.md index 7c0511bf0..7f9cb93d3 100644 --- a/qdrant-landing/content/articles/multitenancy.md +++ b/qdrant-landing/content/articles/multitenancy.md @@ -69,7 +69,8 @@ client.create_collection( sharding_method=models.ShardingMethod.CUSTOM, # ... other collection parameters ) -client.create_shard_key("{collection_name}", "canada", "germany") +client.create_shard_key("{collection_name}", "canada") +client.create_shard_key("{collection_name}", "germany") ``` In this example, your cluster is divided between Germany and Canada. Canadian and German law differ when it comes to international data transfer. Let's say you are creating a RAG application that supports the healthcare industry. Your Canadian customer data will have to be clearly separated for compliance purposes from your German customer. From 85479dc34c4d2e96bda02ed7e30247a25e0314b0 Mon Sep 17 00:00:00 2001 From: George Panchuk Date: Tue, 13 Feb 2024 11:11:36 +0100 Subject: [PATCH 2/3] fix: align collection name --- qdrant-landing/content/articles/multitenancy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qdrant-landing/content/articles/multitenancy.md b/qdrant-landing/content/articles/multitenancy.md index 7f9cb93d3..18f64ec51 100644 --- a/qdrant-landing/content/articles/multitenancy.md +++ b/qdrant-landing/content/articles/multitenancy.md @@ -64,13 +64,13 @@ When creating a collection, you will need to configure user-defined sharding. Th ```python client.create_collection( - collection_name="{collection_name}", + collection_name="{tenant_data}", shard_number=2, sharding_method=models.ShardingMethod.CUSTOM, # ... other collection parameters ) -client.create_shard_key("{collection_name}", "canada") -client.create_shard_key("{collection_name}", "germany") +client.create_shard_key("{tenant_data}", "canada") +client.create_shard_key("{tenant_data}", "germany") ``` In this example, your cluster is divided between Germany and Canada. Canadian and German law differ when it comes to international data transfer. Let's say you are creating a RAG application that supports the healthcare industry. Your Canadian customer data will have to be clearly separated for compliance purposes from your German customer. From 29564c265d6283d7edce81f56aa1bacc18d106b2 Mon Sep 17 00:00:00 2001 From: George Panchuk Date: Tue, 13 Feb 2024 11:14:01 +0100 Subject: [PATCH 3/3] fix: emphasize on distributed deployment docs --- qdrant-landing/content/articles/multitenancy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdrant-landing/content/articles/multitenancy.md b/qdrant-landing/content/articles/multitenancy.md index 18f64ec51..f0109dc65 100644 --- a/qdrant-landing/content/articles/multitenancy.md +++ b/qdrant-landing/content/articles/multitenancy.md @@ -74,7 +74,7 @@ client.create_shard_key("{tenant_data}", "germany") ``` In this example, your cluster is divided between Germany and Canada. Canadian and German law differ when it comes to international data transfer. Let's say you are creating a RAG application that supports the healthcare industry. Your Canadian customer data will have to be clearly separated for compliance purposes from your German customer. -Even though it is part of the same collection, data from each shard is isolated from other shards and can be retrieved as such. For additional examples on shards and retrieval, consult [Qdrant Client specification](https://python-client.qdrant.tech) and our [Distributed Deployments](https://qdrant.tech/documentation/guides/distributed_deployment/) documentation. +Even though it is part of the same collection, data from each shard is isolated from other shards and can be retrieved as such. For additional examples on shards and retrieval, consult [Distributed Deployments](https://qdrant.tech/documentation/guides/distributed_deployment/) documentation and [Qdrant Client specification](https://python-client.qdrant.tech). ## Configure a multitenant setup for users