Skip to content

Commit 3173502

Browse files
committed
Remove ambiguous redisvl.query import for HybridQuery
1 parent cdba22f commit 3173502

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

redisvl/query/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from redisvl.query.aggregate import (
22
AggregateHybridQuery,
33
AggregationQuery,
4-
HybridQuery,
54
MultiVectorQuery,
65
Vector,
76
)
@@ -27,7 +26,6 @@
2726
"TextQuery",
2827
"AggregationQuery",
2928
"AggregateHybridQuery",
30-
"HybridQuery",
3129
"MultiVectorQuery",
3230
"Vector",
3331
]

redisvl/query/hybrid.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def __init__(
7878
accuracy of the search.
7979
yield_vsim_score_as: The name of the field to yield the vector similarity score as.
8080
vector_filter_expression: The filter expression to use for the vector similarity search. Defaults to None.
81-
combination_method: The combination method to use. Options are {RRF, LINEAR}. Defaults to None.
81+
combination_method: The combination method to use. Options are {RRF, LINEAR}. Defaults to None. If "RRF" is
82+
specified, then at least one of `rrf_window` or `rrf_constant` must be provided. If "LINEAR" is
83+
specified, then at least one of `linear_alpha` or `linear_beta` must be provided.
8284
rrf_window: The window size to use for the reciprocal rank fusion (RRF) combination method. Limits
8385
fusion scope.
8486
rrf_constant: The constant to use for the reciprocal rank fusion (RRF) combination method. Controls decay
@@ -102,10 +104,6 @@ def __init__(
102104
within the query text. Defaults to None, as no modifications will be made to the
103105
text_scorer score.
104106
105-
Notes:
106-
If RRF combination method is used, then at least one of `rrf_window` or `rrf_constant` must be provided.
107-
If LINEAR combination method is used, then at least one of `linear_alpha` or `linear_beta` must be provided.
108-
109107
Raises:
110108
TypeError: If the stopwords are not a set, list, or tuple of strings.
111109
ValueError: If the text string is empty, or if the text string becomes empty after

tests/unit/test_hybrid_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from redisvl.query.hybrid import HybridQuery, build_combination_method
2323

2424
REDIS_HYBRID_AVAILABLE = True
25+
SKIP_REASON = ""
2526
except (ImportError, ModuleNotFoundError):
2627
REDIS_HYBRID_AVAILABLE = False
2728
SKIP_REASON = "Requires redis>=8.4.0 and redis-py>=7.1.0"

0 commit comments

Comments
 (0)