Skip to content

Commit 3674e64

Browse files
committed
Fix document and vector fixture
1 parent e4c0303 commit 3674e64

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def index_maker(index_uid=common.INDEX_UID, documents=small_movies):
131131
@fixture(scope="function")
132132
def index_with_documents_and_vectors(empty_index, small_movies):
133133
small_movies[0]["_vectors"] = {"default": [0.1, 0.2]}
134+
for movie in small_movies[1:]:
135+
movie["_vectors"] = {"default": [0.9, 0.9]}
134136

135137
def index_maker(index_uid=common.INDEX_UID, documents=small_movies):
136138
index = empty_index(index_uid)

tests/index/test_index_search_meilisearch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,6 @@ def test_attributes_to_search_on_search_no_match(index_with_documents):
462462
@pytest.mark.usefixtures("enable_vector_search")
463463
def test_vector_search(index_with_documents_and_vectors):
464464
response = index_with_documents_and_vectors().search(
465-
"", opt_params={"vector": [0.1, 0.2], "hybrid": {"semanticRatio": 1.0}}
465+
"Shazam", opt_params={"vector": [0.1, 0.2], "hybrid": {"semanticRatio": 1.0}}
466466
)
467-
assert response["hits"] == []
467+
assert len(response["hits"]) > 0

0 commit comments

Comments
 (0)