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:

ParameterTypePossible valuesDescription
hostsHostsDefault: NoneList of hosts running the OpenSearch client. Optional.
indexStringDefault: defaultName of index in OpenSearch. If it doesn't exist, it is created.
Required.
max_chunk_bytesIntegerDefault: DEFAULT_MAX_CHUNK_BYTESMaximum size of the requests in bytes.
Required.
embedding_dimIntegerDefault: 768Dimension of the embeddings.
Required.
return_embeddingBooleanTrue, False
Default: False
Whether to return the embedding of the retrieved documents.
Required.
methodDictionary of string and anyDefault: NoneThe method definition of the underlying configuration of the approximate k-NN algorithm. To learn more, see the official OpenSearch docs.
Optional.
mappingsDictionary of string and anyDefault: NoneThe mapping of how the documents are stored and indexed. For more information, see the official OpenSearch docs.
Optional.
settingsDictionary of string and anyDefault: DEFAULT_SETTINGSThe settings of the index to be created. See the official OpenSearch docs for more information. Defaults to {"index.knn": True}.
Optional.
create_indexBooleanTrue, False
Default: True
Creates an index if it doesn't exist.
Required.
**kwargsAnySee the official OpenSearch reference for supported valuesOptional 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.