OpenSearchBM25Retriever Parameters

Learn how to customize OpenSearchBM25Retriever.

YAML Init Parameters

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

ParameterTypePossible valuesDescription
document_storeOpenSearchDocumentStoreAn instance of OpenSearchDocumentStore (DeepsetCloudDocumentStore).
Required.
filtersDictionary of string and anyDefault: NoneFilters applied to the retrieved documents.
Optional.
fuzzinessStringDefault: AUTOFuzziness parameter for full-text queries. To learn more about fuzziness, see Elastic documentation.
Required.
top_kIntegerDefault: 10Maximum number of documents to return.
Required.
scale_scoreBooleanTrue, False
Default: False
Whether to scale the score of retrieved documents between 0 and 1. This is useful when comparing documents across different indexes.
Required.
all_terms_must_matchBooleanTrue, False
Default: False
If True, all terms in the query string must be present in the retrieved documents. Useful when searching for short text.
Required.
filter_policyUnion of string and FilterPolicyreplace
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_queryDictionary of string and anyDefault: NoneSpecifies the optional OpenSearch query to use for retrieving documents.
Optional.
raise_on_failureBooleanTrue, 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.