meilisearch-python-sdk 4.1.1__py3-none-any.whl → 4.2.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.

@@ -623,15 +623,18 @@ class AsyncClient(BaseClient):
623
623
  >>> search_results = await client.search(queries)
624
624
  """
625
625
  url = "multi-search"
626
- if federation:
627
- processed_queries = []
628
- for query in queries:
629
- q = query.model_dump(by_alias=True)
626
+ processed_queries = []
627
+ for query in queries:
628
+ q = query.model_dump(by_alias=True)
629
+
630
+ if query.retrieve_vectors is None:
631
+ del q["retrieveVectors"]
632
+
633
+ if federation:
630
634
  del q["limit"]
631
635
  del q["offset"]
632
- processed_queries.append(q)
633
- else:
634
- processed_queries = [x.model_dump(by_alias=True) for x in queries]
636
+
637
+ processed_queries.append(q)
635
638
 
636
639
  if federation:
637
640
  federation_payload = federation.model_dump(by_alias=True)
@@ -1479,15 +1482,18 @@ class Client(BaseClient):
1479
1482
  >>> search_results = client.search(queries)
1480
1483
  """
1481
1484
  url = "multi-search"
1482
- if federation:
1483
- processed_queries = []
1484
- for query in queries:
1485
- q = query.model_dump(by_alias=True)
1485
+ processed_queries = []
1486
+ for query in queries:
1487
+ q = query.model_dump(by_alias=True)
1488
+
1489
+ if query.retrieve_vectors is None:
1490
+ del q["retrieveVectors"]
1491
+
1492
+ if federation:
1486
1493
  del q["limit"]
1487
1494
  del q["offset"]
1488
- processed_queries.append(q)
1489
- else:
1490
- processed_queries = [x.model_dump(by_alias=True) for x in queries]
1495
+
1496
+ processed_queries.append(q)
1491
1497
 
1492
1498
  if federation:
1493
1499
  federation_payload = federation.model_dump(by_alias=True)
@@ -1 +1 @@
1
- VERSION = "4.1.1"
1
+ VERSION = "4.2.0"
@@ -721,6 +721,7 @@ class AsyncIndex(_BaseIndex):
721
721
  vector: list[float] | None = None,
722
722
  hybrid: Hybrid | None = None,
723
723
  locales: list[str] | None = None,
724
+ retrieve_vectors: bool | None = None,
724
725
  ) -> SearchResults:
725
726
  """Search the index.
726
727
 
@@ -781,6 +782,7 @@ class AsyncIndex(_BaseIndex):
781
782
  with caution.
782
783
  locales: Specifies the languages for the search. This parameter can only be used with
783
784
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
785
+ retrieve_vectors: Return document vector data with search result.
784
786
 
785
787
  Returns:
786
788
  Results of the search
@@ -824,6 +826,7 @@ class AsyncIndex(_BaseIndex):
824
826
  hybrid=hybrid,
825
827
  ranking_score_threshold=ranking_score_threshold,
826
828
  locales=locales,
829
+ retrieve_vectors=retrieve_vectors,
827
830
  )
828
831
  search_url = f"{self._base_url_with_uid}/search"
829
832
 
@@ -986,6 +989,7 @@ class AsyncIndex(_BaseIndex):
986
989
  ranking_score_threshold: float | None = None,
987
990
  vector: list[float] | None = None,
988
991
  locales: list[str] | None = None,
992
+ retrieve_vectors: bool | None = None,
989
993
  ) -> FacetSearchResults:
990
994
  """Search the index.
991
995
 
@@ -1038,6 +1042,7 @@ class AsyncIndex(_BaseIndex):
1038
1042
  with caution.
1039
1043
  locales: Specifies the languages for the search. This parameter can only be used with
1040
1044
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
1045
+ retrieve_vectors: Return document vector data with search result.
1041
1046
 
1042
1047
  Returns:
1043
1048
  Results of the search
@@ -1085,6 +1090,7 @@ class AsyncIndex(_BaseIndex):
1085
1090
  ranking_score_threshold=ranking_score_threshold,
1086
1091
  vector=vector,
1087
1092
  locales=locales,
1093
+ retrieve_vectors=retrieve_vectors,
1088
1094
  )
1089
1095
  search_url = f"{self._base_url_with_uid}/facet-search"
1090
1096
 
@@ -5085,6 +5091,7 @@ class Index(_BaseIndex):
5085
5091
  vector: list[float] | None = None,
5086
5092
  hybrid: Hybrid | None = None,
5087
5093
  locales: list[str] | None = None,
5094
+ retrieve_vectors: bool | None = None,
5088
5095
  ) -> SearchResults:
5089
5096
  """Search the index.
5090
5097
 
@@ -5145,6 +5152,7 @@ class Index(_BaseIndex):
5145
5152
  with caution.
5146
5153
  locales: Specifies the languages for the search. This parameter can only be used with
5147
5154
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
5155
+ retrieve_vectors: Return document vector data with search result.
5148
5156
 
5149
5157
  Returns:
5150
5158
  Results of the search
@@ -5188,6 +5196,7 @@ class Index(_BaseIndex):
5188
5196
  hybrid=hybrid,
5189
5197
  ranking_score_threshold=ranking_score_threshold,
5190
5198
  locales=locales,
5199
+ retrieve_vectors=retrieve_vectors,
5191
5200
  )
5192
5201
 
5193
5202
  if self._pre_search_plugins:
@@ -5256,6 +5265,7 @@ class Index(_BaseIndex):
5256
5265
  ranking_score_threshold: float | None = None,
5257
5266
  vector: list[float] | None = None,
5258
5267
  locales: list[str] | None = None,
5268
+ retrieve_vectors: bool | None = None,
5259
5269
  ) -> FacetSearchResults:
5260
5270
  """Search the index.
5261
5271
 
@@ -5308,6 +5318,7 @@ class Index(_BaseIndex):
5308
5318
  with caution.
5309
5319
  locales: Specifies the languages for the search. This parameter can only be used with
5310
5320
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
5321
+ retrieve_vectors: Return document vector data with search result.
5311
5322
 
5312
5323
  Returns:
5313
5324
  Results of the search
@@ -5355,6 +5366,7 @@ class Index(_BaseIndex):
5355
5366
  ranking_score_threshold=ranking_score_threshold,
5356
5367
  vector=vector,
5357
5368
  locales=locales,
5369
+ retrieve_vectors=retrieve_vectors,
5358
5370
  )
5359
5371
 
5360
5372
  if self._pre_facet_search_plugins:
@@ -8262,6 +8274,7 @@ def _process_search_parameters(
8262
8274
  vector: list[float] | None = None,
8263
8275
  hybrid: Hybrid | None = None,
8264
8276
  locales: list[str] | None = None,
8277
+ retrieve_vectors: bool | None = None,
8265
8278
  ) -> JsonDict:
8266
8279
  if attributes_to_retrieve is None:
8267
8280
  attributes_to_retrieve = ["*"]
@@ -8310,6 +8323,9 @@ def _process_search_parameters(
8310
8323
  if locales:
8311
8324
  body["locales"] = locales
8312
8325
 
8326
+ if retrieve_vectors is not None:
8327
+ body["retrieveVectors"] = retrieve_vectors
8328
+
8313
8329
  return body
8314
8330
 
8315
8331
 
@@ -70,6 +70,7 @@ class SearchParams(CamelBase):
70
70
  vector: list[float] | None = None
71
71
  hybrid: Hybrid | None = None
72
72
  locales: list[str] | None = None
73
+ retrieve_vectors: bool | None = None
73
74
 
74
75
  @field_validator("ranking_score_threshold", mode="before") # type: ignore[attr-defined]
75
76
  @classmethod
@@ -56,6 +56,7 @@ class OpenAiEmbedder(CamelBase):
56
56
  document_template: str | None = None
57
57
  document_template_max_bytes: int | None = None
58
58
  distribution: Distribution | None = None
59
+ binary_quantized: bool | None = None
59
60
 
60
61
 
61
62
  class HuggingFaceEmbedder(CamelBase):
@@ -65,6 +66,8 @@ class HuggingFaceEmbedder(CamelBase):
65
66
  document_template: str | None = None
66
67
  document_template_max_bytes: int | None = None
67
68
  distribution: Distribution | None = None
69
+ dimensions: int | None = None
70
+ binary_quantized: bool | None = None
68
71
 
69
72
 
70
73
  class OllamaEmbedder(CamelBase):
@@ -76,6 +79,7 @@ class OllamaEmbedder(CamelBase):
76
79
  document_template: str | None = None
77
80
  document_template_max_bytes: int | None = None
78
81
  distribution: Distribution | None = None
82
+ binary_quantized: bool | None = None
79
83
 
80
84
 
81
85
  class RestEmbedder(CamelBase):
@@ -89,12 +93,16 @@ class RestEmbedder(CamelBase):
89
93
  headers: JsonDict | None = None
90
94
  request: JsonDict
91
95
  response: JsonDict
96
+ binary_quantized: bool | None = None
92
97
 
93
98
 
94
99
  class UserProvidedEmbedder(CamelBase):
95
100
  source: str = "userProvided"
96
101
  dimensions: int
97
102
  distribution: Distribution | None = None
103
+ document_template: str | None = None
104
+ document_template_max_bytes: int | None = None
105
+ binary_quantized: bool | None = None
98
106
 
99
107
 
100
108
  class Embedders(CamelBase):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meilisearch-python-sdk
3
- Version: 4.1.1
3
+ Version: 4.2.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
@@ -1,13 +1,13 @@
1
1
  meilisearch_python_sdk/__init__.py,sha256=SB0Jlm6FwT13J9xasZKseZzTWBk0hkfe1CWyWmIIZnE,258
2
2
  meilisearch_python_sdk/_batch.py,sha256=Hbt-M8Lt8ZDZqcKToUMzUd5zvT-gku709er4pRlvXWk,5065
3
- meilisearch_python_sdk/_client.py,sha256=LJ_MXxdIMfZ-Rva3feZRS7pzfY7rgr0lYUxY8hD9be4,73282
3
+ meilisearch_python_sdk/_client.py,sha256=6nMAYLiRF0uPC52qL8VnlbrUGEkJ8IkU7zyJvtq961k,73254
4
4
  meilisearch_python_sdk/_http_requests.py,sha256=O3M3n-t1jAKwccWowPbk-HPD3ExtHq8a3XhnZT5facs,6746
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=c4Mq0PB9iieEclDeTA6m_tZX7t3ur0ECMvUGRiBxBr4,18
7
+ meilisearch_python_sdk/_version.py,sha256=tfZYB_qyfEQ96DjLP8yhtGHJf56IeQgsGF98v1EvdJE,18
8
8
  meilisearch_python_sdk/decorators.py,sha256=njMn40P-qOzKGGQLCDpsBKWyj2ai10s4XG4IUBSHoD4,8674
9
9
  meilisearch_python_sdk/errors.py,sha256=RNNHXtXLBiCVZaLM2MeKKs9RbRuE-SLRttiPeVAEXgA,2133
10
- meilisearch_python_sdk/index.py,sha256=QIZk0O8cZ3qR2osPb03gSatR72dGaFEF_MC0PqTLmdU,341518
10
+ meilisearch_python_sdk/index.py,sha256=ipJ0L7gZuDYPSnqEz80Ow5lmUQkAHy0W8KMLkNn6Xsw,342333
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,11 +18,11 @@ meilisearch_python_sdk/models/client.py,sha256=ntecx3ya_5EwgnxZfqYsBg9UlyQe_i3jg
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=GGwuhx5Wsn5iyj1ov3f4eWjfw6ttM8WzvyrnSsC4vRg,1132
21
- meilisearch_python_sdk/models/search.py,sha256=lbZXN4DGb3arpG7LtFUxzfOMszIvz24seFRodOaeiVs,3446
22
- meilisearch_python_sdk/models/settings.py,sha256=uCm-F4PDeCR5e2d8WrGT8hwq0VhrCv19MatQVpS8ocU,4154
21
+ meilisearch_python_sdk/models/search.py,sha256=ZySZyA18QuJavz82gK7Kkqfp0fIxWVervCw24W6bToA,3487
22
+ meilisearch_python_sdk/models/settings.py,sha256=ElFzguRJD2GsAU0sZ5lmqdH-QXPM-HQJr1O_wC1Zbzs,4485
23
23
  meilisearch_python_sdk/models/task.py,sha256=_PyuH5tSlHCKMwFsx1nMKjFgc8bDBZxscKYZOdf-4pg,2166
24
24
  meilisearch_python_sdk/models/version.py,sha256=YDu-aj5H-d6nSaWRTXzlwWghmZAoiknaw250UyEd48I,215
25
- meilisearch_python_sdk-4.1.1.dist-info/METADATA,sha256=pyzi4roX2dRKZ_JC7SleT7fK9sNO_HDnNfOh7vhe7DY,9763
26
- meilisearch_python_sdk-4.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
- meilisearch_python_sdk-4.1.1.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
28
- meilisearch_python_sdk-4.1.1.dist-info/RECORD,,
25
+ meilisearch_python_sdk-4.2.0.dist-info/METADATA,sha256=TsBW-27Y1r0SbB8D-rgLCgfcsePQY6UAs-7pFWNwfPo,9763
26
+ meilisearch_python_sdk-4.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ meilisearch_python_sdk-4.2.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
28
+ meilisearch_python_sdk-4.2.0.dist-info/RECORD,,