docs/integrations/vectorstores/azure_cosmos_db/ #27979
Replies: 1 comment
-
Was only able to filter using authorized_users= ['1']
user_permissions = {"metadata.authorizedUsers": {"$in": authorized_users}}
client_filter = {"metadata.customerId": 1}
combined_filter = {
"$and": [
user_permissions,
client_filter
]
}
retriever = vector_store.as_retriever(
search_kwargs={'k': 5, 'fetch_k': 50, 'pre_filter': combined_filter}
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
docs/integrations/vectorstores/azure_cosmos_db/
This notebook shows you how to leverage this integrated vector database to store documents in collections, create indicies and perform vector search queries using approximate nearest neighbor algorithms such as COS (cosine distance), L2 (Euclidean distance), and IP (inner product) to locate documents close to the query vectors.
https://python.langchain.com/docs/integrations/vectorstores/azure_cosmos_db/
Beta Was this translation helpful? Give feedback.
All reactions