Skip to content

Commit cdba22f

Browse files
committed
Update expected number of results to hybrid search default
1 parent cee1fba commit cdba22f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/integration/test_hybrid.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
from redisvl.index import AsyncSearchIndex, SearchIndex
44
from redisvl.query.filter import Geo, GeoRadius, Num, Tag, Text
5-
from redisvl.query.hybrid import HybridQuery
65
from redisvl.redis.utils import array_to_buffer
76
from redisvl.schema import IndexSchema
87
from tests.conftest import (
9-
get_redis_version_async,
108
skip_if_redis_version_below,
119
skip_if_redis_version_below_async,
1210
)
1311

12+
try:
13+
from redisvl.query.hybrid import HybridQuery
14+
except (ImportError, ModuleNotFoundError):
15+
HybridQuery = None # type: ignore
16+
1417

1518
@pytest.fixture
1619
def index_schema(worker_id):
@@ -129,7 +132,7 @@ def test_hybrid_query(index):
129132

130133
results = index.hybrid_search(hybrid_query)
131134
assert isinstance(results, list)
132-
assert len(results) == 7
135+
assert len(results) == 10 # Server-side default for hybrid search
133136
for doc in results:
134137
assert doc["user"] in [
135138
"john",

0 commit comments

Comments
 (0)