Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests related to the next Meilisearch release (v1.6.0) #900

Merged
merged 5 commits into from
Jan 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions tests/index/test_index_search_meilisearch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# pylint: disable=invalid-name

import pytest


def test_basic_search(index_with_documents):
"""Tests search with a simple query."""
Expand Down Expand Up @@ -458,12 +456,12 @@ def test_attributes_to_search_on_search_no_match(index_with_documents):
)
assert response["hits"] == []

# Commented because of https://github.com/meilisearch/meilisearch-python/issues/901
# @pytest.mark.usefixtures("enable_vector_search")
# def test_vector_search(index_with_documents_and_vectors):
# response = index_with_documents_and_vectors().search(
# "How to Train Your Dragon", opt_params={"vector": [0.1, 0.2]}
# )

@pytest.mark.usefixtures("enable_vector_search")
def test_vector_search(index_with_documents_and_vectors):
response = index_with_documents_and_vectors().search(
"How to Train Your Dragon", opt_params={"vector": [0.1, 0.2]}
)

assert response["hits"][0]["id"] == "287947"
assert response["vector"] == [0.1, 0.2]
# assert response["hits"][0]["id"] == "287947"
# assert response["vector"] == [0.1, 0.2]
curquiza marked this conversation as resolved.
Show resolved Hide resolved
Loading