meilisearch-python-sdk 5.0.1__py3-none-any.whl → 5.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of meilisearch-python-sdk might be problematic. Click here for more details.
- meilisearch_python_sdk/_version.py +1 -1
- meilisearch_python_sdk/index.py +38 -0
- meilisearch_python_sdk/models/search.py +5 -5
- {meilisearch_python_sdk-5.0.1.dist-info → meilisearch_python_sdk-5.1.0.dist-info}/METADATA +1 -1
- {meilisearch_python_sdk-5.0.1.dist-info → meilisearch_python_sdk-5.1.0.dist-info}/RECORD +7 -7
- {meilisearch_python_sdk-5.0.1.dist-info → meilisearch_python_sdk-5.1.0.dist-info}/WHEEL +0 -0
- {meilisearch_python_sdk-5.0.1.dist-info → meilisearch_python_sdk-5.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "5.0
|
|
1
|
+
VERSION = "5.1.0"
|
meilisearch_python_sdk/index.py
CHANGED
|
@@ -470,6 +470,25 @@ class AsyncIndex(_BaseIndex):
|
|
|
470
470
|
|
|
471
471
|
return plugins
|
|
472
472
|
|
|
473
|
+
async def compact(self) -> TaskInfo:
|
|
474
|
+
"""Appends a new task to the queue to compact the database.
|
|
475
|
+
|
|
476
|
+
This defragments the LMDB database potentially speeds up indexing and searching.
|
|
477
|
+
NOTE: This is only available in Meilisearch v1.23.0+
|
|
478
|
+
|
|
479
|
+
Raises:
|
|
480
|
+
MeilisearchCommunicationError: If there was an error communicating with the server.
|
|
481
|
+
MeilisearchApiError: If the Meilisearch API returned an error.
|
|
482
|
+
|
|
483
|
+
Examples
|
|
484
|
+
>>> from meilisearch_python_sdk import AsyncClient
|
|
485
|
+
>>> async with AsyncClient("http://localhost.com", "masterKey") as client:
|
|
486
|
+
>>> index = client.index("movies")
|
|
487
|
+
>>> index.compact()
|
|
488
|
+
"""
|
|
489
|
+
response = await self._http_requests.post(f"{self._base_url_with_uid}/compact")
|
|
490
|
+
return TaskInfo(**response.json())
|
|
491
|
+
|
|
473
492
|
async def delete(self) -> TaskInfo:
|
|
474
493
|
"""Deletes the index.
|
|
475
494
|
|
|
@@ -4921,6 +4940,25 @@ class Index(_BaseIndex):
|
|
|
4921
4940
|
|
|
4922
4941
|
return plugins
|
|
4923
4942
|
|
|
4943
|
+
def compact(self) -> TaskInfo:
|
|
4944
|
+
"""Appends a new task to the queue to compact the database.
|
|
4945
|
+
|
|
4946
|
+
This defragments the LMDB database potentially speeds up indexing and searching.
|
|
4947
|
+
NOTE: This is only available in Meilisearch v1.23.0+
|
|
4948
|
+
|
|
4949
|
+
Raises:
|
|
4950
|
+
MeilisearchCommunicationError: If there was an error communicating with the server.
|
|
4951
|
+
MeilisearchApiError: If the Meilisearch API returned an error.
|
|
4952
|
+
|
|
4953
|
+
Examples
|
|
4954
|
+
>>> from meilisearch_python_sdk import Client
|
|
4955
|
+
>>> client = Client("http://localhost.com", "masterKey")
|
|
4956
|
+
>>> index = client.index("movies")
|
|
4957
|
+
>>> index.compact()
|
|
4958
|
+
"""
|
|
4959
|
+
response = self._http_requests.post(f"{self._base_url_with_uid}/compact")
|
|
4960
|
+
return TaskInfo(**response.json())
|
|
4961
|
+
|
|
4924
4962
|
def delete(self) -> TaskInfo:
|
|
4925
4963
|
"""Deletes the index.
|
|
4926
4964
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Generic, Literal, TypeVar
|
|
4
4
|
|
|
5
5
|
from camel_converter.pydantic_base import CamelBase
|
|
6
6
|
from pydantic import Field, field_validator
|
|
@@ -83,12 +83,12 @@ class SearchParams(CamelBase):
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class SearchResults(CamelBase, Generic[T]):
|
|
86
|
-
hits:
|
|
86
|
+
hits: list[T]
|
|
87
87
|
offset: int | None = None
|
|
88
88
|
limit: int | None = None
|
|
89
89
|
estimated_total_hits: int | None = None
|
|
90
90
|
processing_time_ms: int
|
|
91
|
-
query:
|
|
91
|
+
query: str
|
|
92
92
|
facet_distribution: JsonDict | None = None
|
|
93
93
|
total_pages: int | None = None
|
|
94
94
|
total_hits: int | None = None
|
|
@@ -103,7 +103,7 @@ class SearchResultsWithUID(SearchResults, Generic[T]):
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
class SearchResultsFederated(CamelBase, Generic[T]):
|
|
106
|
-
hits:
|
|
106
|
+
hits: list[T]
|
|
107
107
|
offset: int | None = None
|
|
108
108
|
limit: int | None = None
|
|
109
109
|
estimated_total_hits: int | None = None
|
|
@@ -118,7 +118,7 @@ class SearchResultsFederated(CamelBase, Generic[T]):
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
class SimilarSearchResults(CamelBase, Generic[T]):
|
|
121
|
-
hits:
|
|
121
|
+
hits: list[T]
|
|
122
122
|
id: str
|
|
123
123
|
processing_time_ms: int
|
|
124
124
|
limit: int | None = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meilisearch-python-sdk
|
|
3
|
-
Version: 5.0
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: A Python client providing both async and sync support for the Meilisearch API
|
|
5
5
|
Project-URL: repository, https://github.com/sanders41/meilisearch-python-sdk
|
|
6
6
|
Project-URL: homepage, https://github.com/sanders41/meilisearch-python-sdk
|
|
@@ -4,10 +4,10 @@ meilisearch_python_sdk/_client.py,sha256=HA0FdvsVGAHhUt6mVB-sK03bIzVivN7ProcimeQ
|
|
|
4
4
|
meilisearch_python_sdk/_http_requests.py,sha256=9NMTKrJDFpdWZKPLNGlRQ54EtqhPXlhov3EoeR3VrwU,6773
|
|
5
5
|
meilisearch_python_sdk/_task.py,sha256=QgVcqMlZdURRS_oYpB_bTBa5dvT3Sp_-O0-s6TqAxHk,12485
|
|
6
6
|
meilisearch_python_sdk/_utils.py,sha256=NoCDxJPhjABeuSxFTNCih585UDWdXEUBD_FvdgtScQw,1539
|
|
7
|
-
meilisearch_python_sdk/_version.py,sha256=
|
|
7
|
+
meilisearch_python_sdk/_version.py,sha256=n65_AMV9xWnAAWXLUYz_Z2Q1OdGU8iqZ-dRAydz390w,18
|
|
8
8
|
meilisearch_python_sdk/decorators.py,sha256=xtG-ptJkVbPlbC1hJQ6dPgPYqU27VluGwL_CTJuIq3I,8701
|
|
9
9
|
meilisearch_python_sdk/errors.py,sha256=RNNHXtXLBiCVZaLM2MeKKs9RbRuE-SLRttiPeVAEXgA,2133
|
|
10
|
-
meilisearch_python_sdk/index.py,sha256=
|
|
10
|
+
meilisearch_python_sdk/index.py,sha256=CI4K_G997MmMnGR3U-oe3OzvROpzMbibfVHFZjHwKkA,351125
|
|
11
11
|
meilisearch_python_sdk/json_handler.py,sha256=c1rGKzYlE0dGfLygQjPqVUNfQkN1JvafBGmIx31JW8g,2044
|
|
12
12
|
meilisearch_python_sdk/plugins.py,sha256=YySzTuVr4IrogTgrP8q-gZPsew8TwedopjWnTj5eV48,3607
|
|
13
13
|
meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -18,12 +18,12 @@ meilisearch_python_sdk/models/client.py,sha256=nefi6ViSaSd_mtopRAhM9tzzepwChFJUk
|
|
|
18
18
|
meilisearch_python_sdk/models/documents.py,sha256=eT3FHrPND-g2IzNRyOHQApTTJ1WbFcGlqgxZ6aKrRgI,247
|
|
19
19
|
meilisearch_python_sdk/models/health.py,sha256=hvruti7ylsk7bAh8RPOhTPcRrjx6MPgdkDFX9vZ5Qks,95
|
|
20
20
|
meilisearch_python_sdk/models/index.py,sha256=WLQOi3_HChko134FkRU1H3_cJjhHJCFclcx4oDBlqHU,1228
|
|
21
|
-
meilisearch_python_sdk/models/search.py,sha256=
|
|
21
|
+
meilisearch_python_sdk/models/search.py,sha256=U3ph1GW9Xkbw33pIlGDa7rlTGsdvqahjRJjPxUou8n8,3581
|
|
22
22
|
meilisearch_python_sdk/models/settings.py,sha256=eh0xnro4D_sj8ck2nifa3tBdf2_7RcZlAY_zQhfsY0s,5730
|
|
23
23
|
meilisearch_python_sdk/models/task.py,sha256=JVYF46ylD-XwqVVNq2offhLOkljaGxPyRVuF6PwLOBU,2174
|
|
24
24
|
meilisearch_python_sdk/models/version.py,sha256=ISU-ZHgpXLBFDuMpWWfKdVo9Dq1HcD7s6HFnCiGTF8Y,184
|
|
25
25
|
meilisearch_python_sdk/models/webhook.py,sha256=zSkEJJdEflinW3_seJTLQ_ZWs4w-pjTD3SS1ZawC32k,455
|
|
26
|
-
meilisearch_python_sdk-5.0.
|
|
27
|
-
meilisearch_python_sdk-5.0.
|
|
28
|
-
meilisearch_python_sdk-5.0.
|
|
29
|
-
meilisearch_python_sdk-5.0.
|
|
26
|
+
meilisearch_python_sdk-5.1.0.dist-info/METADATA,sha256=WJgG0U-GzXz7ubBm6oY62PtSdbFlHBrwdgBjFfdTolg,9699
|
|
27
|
+
meilisearch_python_sdk-5.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
28
|
+
meilisearch_python_sdk-5.1.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
|
|
29
|
+
meilisearch_python_sdk-5.1.0.dist-info/RECORD,,
|
|
File without changes
|
{meilisearch_python_sdk-5.0.1.dist-info → meilisearch_python_sdk-5.1.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|