Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

QdrantDocumentStore

Use the Qdrant database as your document store.


Basic Information​

  • Used with the following retrievers:
    • QdrantEmbeddingRetriever
    • QdrantSparseEmbeddingRetriever
    • QdrantHybridRetriever
  • Type: haystack_integrations.document_stores.qdrant.document_store.QdrantDocumentStore
Hosting

You must host the Qdrant database locally to make it work with Haystack Enterprise Platform. For instructions, see Qdrant documentation.

Overview​

For details, see QdrantDocumentStore in Haystack documentation.

Authorization​

To use an API key for your Qdrant database, create a secret for it and then pass it its name in the api_key parameter of the document store. To learn more about secrets, see Add Secrets to Connect to Third Party Providers.

Usage

For instructions on how to create a secret to connect to the document store, write documents, and then retrieve them, see Connect to external database.

Example Configuration​

In an Index​

To write the preprocessed files into the document store:

  1. Add DocumentWriter to your pipeline.
  2. Add QdrantDocumentStore and configure it on the component card.
  3. Connect the two components.

In a Query Pipeline​

To retrieve files from the document store:

  1. Add a Qdrant retriever to your pipeline.
  2. Add QdrantDocumentStore and configure it on the component card.
  3. Connect the document store and the retriever.

Example​

When you switch to YAML, you can see that the document store is an argument of DocumentWriter. It's the same for retrievers:

components:
DocumentWriter:
type: haystack.components.writers.document_writer.DocumentWriter
init_parameters:
policy: NONE
document_store: # document store configuration
type: haystack_integrations.document_stores.qdrant.document_store.QdrantDocumentStore # document store configuration
init_parameters:
port: 6333
grpc_port: 6334
prefer_grpc: false
force_disable_check_same_thread: false
index: Document
embedding_dim: 768
on_disk: false
use_sparse_embeddings: false
sparse_idf: false
similarity: cosine
return_embedding: false
progress_bar: true
recreate_index: false
wait_result_from_api: true
write_batch_size: 100
scroll_size: 10000

Init Parameters​

To check the parameters you can customize for this document store, see QdrantDocumentStore API reference in Haystack documentation.