OpenSearchDocumentStore Parameters

Learn how to customize OpenSearchDocumentStore.

YAML Init Parameters

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

Parameter

Type

Possible values

Description

hosts

Hosts

Default: None

List of hosts running the OpenSearch client. Optional.

index

String

Default: default

Name of index in OpenSearch. If it doesn't exist, it is created.
Required.

max_chunk_bytes

Integer

Default: DEFAULT_MAX_CHUNK_BYTES

Maximum size of the requests in bytes.
Required.

embedding_dim

Integer

Default: 768

Dimension of the embeddings.
Required.

return_embedding

Boolean

True, False
Default: False

Whether to return the embedding of the retrieved documents.
Required.

method

Dictionary of string and any

Default: None

The method definition of the underlying configuration of the approximate k-NN algorithm. To learn more, see the official OpenSearch docs.
Optional.

mappings

Dictionary of string and any

Default: None

The mapping of how the documents are stored and indexed. For more information, see the official OpenSearch docs.
Optional.

settings

Dictionary of string and any

Default: DEFAULT_SETTINGS

The settings of the index to be created. See the official OpenSearch docs for more information. Defaults to {"index.knn": True}.
Optional.

create_index

Boolean

True, False
Default: True

Creates an index if it doesn't exist.
Required.

**kwargs

Any

See the official OpenSearch reference for supported values

Optional arguments that OpenSearch takes. For the full list of supported kwargs, see the official OpenSearch reference and connection parameters.


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.