OpenSearchDocumentStore
The core document store of deepset AI Platform.
Basic Information
- Used with the following retrievers:
OpenSearchBM25RetrieverOpenSearchEmbeddingRetriever
- Type:
haystack_integrations.document_stores.opensearch.document_store.OpenSearchDocumentStore
Overview
For details on how this document store works, see OpenSearchDocumentStore in the Haystack documentation.
Authorization
This is the core document store of deepset AI Platform and as such, we handle the authorization.
Example Configuration
In an Index
To write the preprocesses files into the document store:
- Add
DocumentWriterto your pipeline. - Add
OpenSearchDocumentStoreand configure it on the component card. - Connect
OpenSearchDocumentStoretoDocumentWriter.
In a Query Pipeline
To retrieve files from the document store:
- Add an OpenSearch retriever to your pipeline.
- Add
OpenSearchDocumentStoreand configure it on the component card. - Connect
OpenSearchDocumentStoreto the retriever.
Example
This is an example of the document store connected to a keyword and a vector retriever:

When you switch to YAML, you'll see that the document store is an argument of each retriever:
components:
query_expander:
type: haystack.components.query.query_expander.QueryExpander
init_parameters:
n_expansions: 3
include_original_query: true
chat_generator:
type: haystack_integrations.components.generators.anthropic.chat.chat_generator.AnthropicChatGenerator
init_parameters: {}
multi_query_retriever:
type: haystack.components.retrievers.multi_query_text_retriever.MultiQueryTextRetriever
init_parameters:
retriever:
type: haystack_integrations.components.retrievers.opensearch.bm25_retriever.OpenSearchBM25Retriever
init_parameters:
document_store:
type: haystack_integrations.document_stores.opensearch.document_store.OpenSearchDocumentStore
top_k: 5
connections:
- sender: query_expander.queries
receiver: multi_query_retriever.queries
max_runs_per_component: 100
metadata: {}
inputs:
query:
- query_expander.query
Init Parameters
For a list of parameters you can configure, see OpenSearchDocumentStore API reference in Haystack documentation.
Was this page helpful?