Skip to content

Commit 45ffebe

Browse files
committed
Stabilize vector store usage
1 parent 7615a7f commit 45ffebe

File tree

5 files changed

+1
-29
lines changed

5 files changed

+1
-29
lines changed

Diff for: meilisearch/index.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,7 @@ def search(self, query: str, opt_params: Optional[Mapping[str, Any]] = None) ->
281281
String containing the searched word(s)
282282
opt_params (optional):
283283
Dictionary containing optional query parameters.
284-
Note: The vector parameter is only available in Meilisearch >= v1.3.0, and is experimental
285-
Meilisearch v1.3.0. In order to use this feature in Meilisearch v1.3.0 you first need to
286-
enable the feature by sending a PATCH request to /experimental-features with
287-
{ "vectoreStore": true }. Because this feature is experimental it may be removed or
288-
updated causing breaking changes in this library without a major version bump so use
289-
with caution.
284+
Note: The vector parameter is available in Meilisearch >= v1.13.0
290285
https://www.meilisearch.com/docs/reference/api/search#search-in-an-index
291286
292287
Returns

Diff for: tests/conftest.py

-17
Original file line numberDiff line numberDiff line change
@@ -213,23 +213,6 @@ def get_private_key(client):
213213
return key
214214

215215

216-
@fixture
217-
def enable_vector_search():
218-
requests.patch(
219-
f"{common.BASE_URL}/experimental-features",
220-
headers={"Authorization": f"Bearer {common.MASTER_KEY}"},
221-
json={"vectorStore": True},
222-
timeout=10,
223-
)
224-
yield
225-
requests.patch(
226-
f"{common.BASE_URL}/experimental-features",
227-
headers={"Authorization": f"Bearer {common.MASTER_KEY}"},
228-
json={"vectorStore": False},
229-
timeout=10,
230-
)
231-
232-
233216
@fixture
234217
def new_embedders():
235218
return {

Diff for: tests/index/test_index_search_meilisearch.py

-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ def test_show_ranking_score(index_with_documents):
502502
assert response["hits"][0]["_rankingScore"] >= 0.9
503503

504504

505-
@pytest.mark.usefixtures("enable_vector_search")
506505
def test_vector_search(index_with_documents_and_vectors):
507506
response = index_with_documents_and_vectors().search(
508507
"",

Diff for: tests/settings/test_settings.py

-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def test_get_settings_default(empty_index):
4141
assert response["synonyms"] == {}
4242

4343

44-
@pytest.mark.usefixtures("enable_vector_search")
4544
def test_update_settings(new_settings, empty_index):
4645
"""Tests updating some settings."""
4746
index = empty_index()
@@ -61,7 +60,6 @@ def test_update_settings(new_settings, empty_index):
6160
assert isinstance(response["embedders"]["open_ai"], OpenAiEmbedder)
6261

6362

64-
@pytest.mark.usefixtures("enable_vector_search")
6563
def test_reset_settings(new_settings, empty_index):
6664
"""Tests resetting all the settings to their default value."""
6765
index = empty_index()

Diff for: tests/settings/test_settings_embedders.py

-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
from meilisearch.models.index import OpenAiEmbedder, UserProvidedEmbedder
55

66

7-
@pytest.mark.usefixtures("enable_vector_search")
87
def test_get_default_embedders(empty_index):
98
"""Tests getting default embedders."""
109
response = empty_index().get_embedders()
1110

1211
assert response is None
1312

1413

15-
@pytest.mark.usefixtures("enable_vector_search")
1614
def test_update_embedders_with_user_provided_source(new_embedders, empty_index):
1715
"""Tests updating embedders."""
1816
index = empty_index()
@@ -24,7 +22,6 @@ def test_update_embedders_with_user_provided_source(new_embedders, empty_index):
2422
assert isinstance(response_get.embedders["open_ai"], OpenAiEmbedder)
2523

2624

27-
@pytest.mark.usefixtures("enable_vector_search")
2825
def test_reset_embedders(new_embedders, empty_index):
2926
"""Tests resetting the typo_tolerance setting to its default value."""
3027
index = empty_index()

0 commit comments

Comments
 (0)