Handler for connecting to a Qdrant database, enabling multi-user mode on the Qdrant database instance.
The Qdrant adapter is one of Cognee’s community adapters, which can be found on our community repo.
Make sure that ENABLE_BACKEND_ACCESS_CONTROL in your .env file is NOT set to False.
Multi-user mode is enabled by default, therefore ENABLE_BACKEND_ACCESS_CONTROL=True by default.
You will need a running Qdrant database instance, and the existing handler works with both local and cloud setups.
All you need to do is provide the necessary connection information, like the following example does for a local setup:
After setting up your instance and connection information, you will need to register the adapter and handler to Cognee,
so it knows which database to use. Registering the adapter also registers the dataset database handler.
In your code, add the following import statement:
from cognee_community_vector_adapter_qdrant import register
The final important piece of information is to let Cognee know which handler you are using.
This can be done by setting the following .env variable: