WeaviateDocumentStore

Use the Weaviate database as your document store.

Basic Information

Overview

For details, see WeaviateDocumentStore in Haystack documentation.

Authorization

If you're using a paid option, you need a Weaviate account and a url and api_key to use this document store. You can 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 Indexing Pipeline

To write the preprocesses files into the document store:

  1. Add DocumentWriter to your pipeline.
  2. On the component card, click Configure under the document_store parameters. This opens a YAML editor.

In a Query Pipeline

To retrieve files from the document store:

  1. Add a Weaviate retriever to your pipeline.
  2. On the retriever's card, click Configure under the document_store parameter. This opens a YAML editor.

Example

This is where you can access the configuration:

The Configure button under the document_store parameter on a component card Document store configuration

This is an example YAML configuration of WeaviateDocumentStore:

type: haystack_integrations.document_stores.weaviate.document_store.WeaviateDocumentStore
init_parameters:
  url: https://b9gj5brpohwbg7uaasta.c0.europe-west3.gcp.weaviate.cloud
  auth_client_secret:
    type: api_key
    init_parameters:
      api_key:
        type: env_var
        env_vars:
          - WEAVIATE_API_KEY
        strict: false


Init Parameters

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