ArangoDocumentStore
Store and retrieve documents using ArangoDB, a multi-model database with native vector similarity search. Vector search requires ArangoDB 3.12 or later.
Key Features
- Stores documents in an ArangoDB collection with vector search support.
- Supports cosine, dot product, and L2 similarity functions.
- Creates the database and collection automatically if they do not exist.
- Configurable embedding dimensions to match your embedding model.
- Supports Haystack metadata filters at retrieval time.
Configuration
Add Workspace-Level Integration
- Click your profile icon and choose Settings.
- Go to Workspace>Integrations.
- Find the provider you want to connect and click Connect next to them.
- Enter the API key and any other required details.
- Click Connect. You can use this integration in pipelines and indexes in the current workspace.
Add Organization-Level Integration
- Click your profile icon and choose Settings.
- Go to Organization>Integrations.
- Find the provider you want to connect and click Connect next to them.
- Enter the API key and any other required details.
- Click Connect. You can use this integration in pipelines and indexes in all workspaces in the current organization.
- Install and run ArangoDB 3.12 or later (default endpoint:
http://localhost:8529). - Set the
ARANGO_USERNAMEandARANGO_PASSWORDenvironment variables. For instructions, see Create Secrets. - Configure the
ArangoDocumentStorein your pipeline YAML with the appropriate connection parameters.
Source Code
To check this component's source code, open document_store.py in the Haystack Core Integrations repository.
Usage Examples
Basic Configuration
ArangoDocumentStore:
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
Parameters
Init Parameters
These are the parameters you can configure in Pipeline Builder:
| Parameter | Type | Default | Description |
|---|---|---|---|
host | str | http://localhost:8529 | The URL of the ArangoDB server. |
database | str | haystack | The name of the database to use. Created if it does not exist. |
username | Secret | Secret.from_env_var("ARANGO_USERNAME", strict=False) | The ArangoDB username. Falls back to root if the variable is not set. |
password | Secret | Secret.from_env_var("ARANGO_PASSWORD") | The ArangoDB password. |
collection_name | str | haystack_documents | The name of the collection to store documents in. |
embedding_dimension | int | 768 | The dimensionality of document embeddings. Must match your embedding model's output. |
recreate_collection | bool | False | Whether to drop and recreate the collection on startup. |
similarity_function | str | cosine | The vector similarity function. One of cosine, dot_product, or l2. |
Related Information
Was this page helpful?