@@ -37,6 +37,9 @@ def scorer(self, scorer: str) -> "HybridSearchQuery":
3737 """
3838 Scoring algorithm for text search query.
3939 Allowed values are "TFIDF", "DISMAX", "DOCSCORE", "BM25", etc.
40+
41+ For more information about supported scroring algorithms,
42+ see https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/scoring/
4043 """
4144 self ._scorer = scorer
4245 return self
@@ -188,6 +191,19 @@ def __init__(self, method: CombinationMethods, **kwargs) -> None:
188191 Args:
189192 method: The combine method to use - RRF or LINEAR.
190193 kwargs: Additional combine parameters.
194+ For RRF, the following parameters are supported(at least one should be provided):
195+ WINDOW: Limits fusion scopeLimits fusion scope.
196+ CONSTANT: Controls decay of rank influence.
197+ YIELD_SCORE_AS: The name of the field to yield the calculated score as.
198+ For LINEAR, supported parameters (at least one should be provided):
199+ ALPHA: The weight of the first query.
200+ BETA: The weight of the second query.
201+ YIELD_SCORE_AS: The name of the field to yield the calculated score as.
202+
203+ The additional parameters are not validated and are passed as is to the server.
204+ The supported format is to provide the parameter names and values like the following:
205+ CombineResultsMethod(CombinationMethods.RRF, WINDOW=3, CONSTANT=0.5)
206+ CombineResultsMethod(CombinationMethods.LINEAR, ALPHA=0.5, BETA=0.5)
191207 """
192208 self ._method = method
193209 self ._kwargs = kwargs
0 commit comments