ArangoDocumentStore
Use ArangoDB as your document store. ArangoDB is a multi-model database with native vector similarity search. Vector search requires ArangoDB 3.12 or later.
Basic Information
- Used with the following retrievers:
ArangoEmbeddingRetriever
- Type:
haystack_integrations.document_stores.arangodb.document_store.ArangoDocumentStore
Overview
ArangoDocumentStore stores documents in an ArangoDB collection and supports vector similarity search with cosine, dot product, or L2 metrics. For component parameters and YAML examples, see ArangoDocumentStore in the pipeline components reference.
Authorization
You need access to an ArangoDB instance. Create secrets for ARANGO_USERNAME and ARANGO_PASSWORD, then pass them in the document store configuration. 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:
- Add
DocumentWriterto your pipeline. - Add
ArangoDocumentStoreand configure it on the component card. - Connect the components using their
document_storeconnection point.
In a Query Pipeline
To retrieve files from the document store:
- Add
ArangoEmbeddingRetrieverto your pipeline. - Add
ArangoDocumentStoreand configure it on the component card. - Connect the document store to the retriever.
- Connect a text embedder to the retriever's
query_embeddinginput.
Example
When you switch to YAML, you can see that the document store is an argument of DocumentWriter or ArangoEmbeddingRetriever:
DocumentWriter:
type: haystack.components.writers.document_writer.DocumentWriter
init_parameters:
policy: NONE
document_store:
type: haystack_integrations.document_stores.arangodb.document_store.ArangoDocumentStore
init_parameters:
host: http://localhost:8529
database: haystack
username:
type: env_var
env_vars:
- ARANGO_USERNAME
strict: false
password:
type: env_var
env_vars:
- ARANGO_PASSWORD
strict: false
collection_name: haystack_documents
embedding_dimension: 768
similarity_function: cosine
Init Parameters
To check the parameters you can customize for this document store, see ArangoDocumentStore.
Related Information
Was this page helpful?