OpenSearchEmbeddingRetriever Parameters

Learn how to customize OpenSearchEmbeddingRetriever.

YAML Init Parameters

These are the parameters you can pass to this component in the pipeline YAML configuration:

Parameter

Type

Possible values

Description

document_store

OpenSearchDocumentStore

Default: OpenSearchDocumentStore

An instance of OpenSearchDocumentStore (DeepsetCloudDocumentStore).
Required.

filters

Dictionary of string and any

Default: None

Filters applied to the retrieved Documents. Filters are applied during the approximate kNN search to ensure that top_k matching documents are returned. Optional.

top_k

Integer

Default: 10

Maximum number of documents to return. Required.

filter_policy

Union of string and FilterPolicy

replace
merge
Default: replace

Policy to determine how filters are applied. Possible values:

  • replace: Overrides the filters set through the retriever's filters parameter with the filters provided at search time.
  • merge: Merges the filters set through the retriever's filters parameter with the filters specified at search time, with the search time filters taking precedence.
    Required.

custom_query

Dictionary of string and any

Default: None

Specifies the optional OpenSearch query to use for retrieving documents.
Optional.

raise_on_failure

Boolean

True, False
Default: False

Raises an exception if the API call fails.
Required.


REST API Runtime Parameters

There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.