Skip to content

Commit

Permalink
Merge pull request #842 from sanders41/meilisearch-1.7.0
Browse files Browse the repository at this point in the history
Update for Meilisearch v1.7.0
  • Loading branch information
sanders41 authored Mar 11, 2024
2 parents a7cf4da + 532f9cc commit baa3f1f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 19 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: "3"

services:
meilisearch:
image: getmeili/meilisearch:latest
# image: getmeili/meilisearch:latest
image: getmeili/meilisearch:v1.7.0-rc.2
ports:
- "7700:7700"
environment:
Expand Down
2 changes: 1 addition & 1 deletion meilisearch_python_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.7.0"
VERSION = "2.8.0"
12 changes: 8 additions & 4 deletions meilisearch_python_sdk/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ async def search(
to use this feature in Meilisearch v1.3.0 you first need to enable the feature by
sending a PATCH request to /experimental-features with { "scoreDetails": true }.
Because this feature is experimental it may be removed or updated causing breaking
changes in this library without a major version bump so use with caution.
changes in this library without a major version bump so use with caution. This
feature became stable in Meiliseach v1.7.0.
vector: List of vectors for vector search. Defaults to None. Note: This parameter can
only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0.
In order to use this feature in Meilisearch v1.3.0 you first need to enable the
Expand Down Expand Up @@ -1014,7 +1015,8 @@ async def facet_search(
to use this feature in Meilisearch v1.3.0 you first need to enable the feature by
sending a PATCH request to /experimental-features with { "scoreDetails": true }.
Because this feature is experimental it may be removed or updated causing breaking
changes in this library without a major version bump so use with caution.
changes in this library without a major version bump so use with caution. This
feature became stable in Meiliseach v1.7.0.
vector: List of vectors for vector search. Defaults to None. Note: This parameter can
only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0.
In order to use this feature in Meilisearch v1.3.0 you first need to enable the
Expand Down Expand Up @@ -4843,7 +4845,8 @@ def search(
to use this feature in Meilisearch v1.3.0 you first need to enable the feature by
sending a PATCH request to /experimental-features with { "scoreDetails": true }.
Because this feature is experimental it may be removed or updated causing breaking
changes in this library without a major version bump so use with caution.
changes in this library without a major version bump so use with caution. This
feature became stable in Meiliseach v1.7.0.
vector: List of vectors for vector search. Defaults to None. Note: This parameter can
only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0.
In order to use this feature in Meilisearch v1.3.0 you first need to enable the
Expand Down Expand Up @@ -5001,7 +5004,8 @@ def facet_search(
to use this feature in Meilisearch v1.3.0 you first need to enable the feature by
sending a PATCH request to /experimental-features with { "scoreDetails": true }.
Because this feature is experimental it may be removed or updated causing breaking
changes in this library without a major version bump so use with caution.
changes in this library without a major version bump so use with caution. This
feature became stable in Meiliseach v1.7.0.
vector: List of vectors for vector search. Defaults to None. Note: This parameter can
only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0.
In order to use this feature in Meilisearch v1.3.0 you first need to enable the
Expand Down
1 change: 1 addition & 0 deletions meilisearch_python_sdk/models/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Pagination(CamelBase):
class OpenAiEmbedder(CamelBase):
source: str = "openAi"
model: Optional[str] = None # Defaults to text-embedding-ada-002
dimensions: Optional[int] = None # Uses the model default
api_key: Optional[str] = None # Can be provided through a CLI option or environment variable
document_template: Optional[str] = None

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "meilisearch-python-sdk"
version = "2.7.0"
version = "2.8.0"
description = "A Python client providing both async and sync support for the Meilisearch API"
authors = ["Paul Sanders <psanders1@gmail.com>"]
license = "MIT"
Expand Down
10 changes: 0 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,6 @@ async def default_search_key(async_client):
return key


@pytest.fixture
async def enable_score_details():
async with HttpxAsyncClient(
base_url=BASE_URL, headers={"Authorization": f"Bearer {MASTER_KEY}"}
) as client:
await client.patch("/experimental-features", json={"scoreDetails": True})
yield
await client.patch("/experimental-features", json={"scoreDetails": False})


@pytest.fixture
async def enable_vector_search():
async with HttpxAsyncClient(
Expand Down
1 change: 0 additions & 1 deletion tests/test_async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ async def test_show_ranking_score_serach(async_index_with_documents):
assert "_rankingScore" in response.hits[0]


@pytest.mark.usefixtures("enable_score_details")
async def test_show_ranking_details_serach(async_index_with_documents):
index = await async_index_with_documents()
response = await index.search("How to Train Your Dragon", show_ranking_score_details=True)
Expand Down
1 change: 0 additions & 1 deletion tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ def test_show_ranking_score_serach(index_with_documents):
assert "_rankingScore" in response.hits[0]


@pytest.mark.usefixtures("enable_score_details")
def test_show_ranking_details_serach(index_with_documents):
index = index_with_documents()
response = index.search("How to Train Your Dragon", show_ranking_score_details=True)
Expand Down

0 comments on commit baa3f1f

Please sign in to comment.