Learn how to customize OpenSearchBM25Retriever.
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 | An instance of OpenSearchDocumentStore (DeepsetCloudDocumentStore). Required. | |
filters | Dictionary of string and any | Default: None | Filters applied to the retrieved documents. Optional. |
fuzziness | String | Default: AUTO | Fuzziness parameter for full-text queries. To learn more about fuzziness, see Elastic documentation. Required. |
top_k | Integer | Default: 10 | Maximum number of documents to return. Required. |
scale_score | Boolean | True , 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_match | Boolean | True , 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_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.