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

@@ -123,7 +123,6 @@ class AsyncIndex(_BaseIndex):
123
123
  """Class initializer.
124
124
 
125
125
  Args:
126
-
127
126
  http_client: An instance of the AsyncClient. This automatically gets passed by the
128
127
  AsyncClient when creating and AsyncIndex instance.
129
128
  uid: The index's unique identifier.
@@ -155,10 +154,9 @@ class AsyncIndex(_BaseIndex):
155
154
  if not self.plugins or not self.plugins.add_documents_plugins:
156
155
  return None
157
156
 
158
- plugins = []
159
- for plugin in self.plugins.add_documents_plugins:
160
- if plugin.CONCURRENT_EVENT:
161
- plugins.append(plugin)
157
+ plugins = [
158
+ plugin for plugin in self.plugins.add_documents_plugins if plugin.CONCURRENT_EVENT
159
+ ]
162
160
 
163
161
  if not plugins:
164
162
  return None
@@ -170,10 +168,7 @@ class AsyncIndex(_BaseIndex):
170
168
  if not self.plugins or not self.plugins.add_documents_plugins:
171
169
  return None
172
170
 
173
- plugins = []
174
- for plugin in self.plugins.add_documents_plugins:
175
- if plugin.POST_EVENT:
176
- plugins.append(plugin)
171
+ plugins = [plugin for plugin in self.plugins.add_documents_plugins if plugin.POST_EVENT]
177
172
 
178
173
  if not plugins:
179
174
  return None
@@ -185,10 +180,7 @@ class AsyncIndex(_BaseIndex):
185
180
  if not self.plugins or not self.plugins.add_documents_plugins:
186
181
  return None
187
182
 
188
- plugins = []
189
- for plugin in self.plugins.add_documents_plugins:
190
- if plugin.PRE_EVENT:
191
- plugins.append(plugin)
183
+ plugins = [plugin for plugin in self.plugins.add_documents_plugins if plugin.PRE_EVENT]
192
184
 
193
185
  if not plugins:
194
186
  return None
@@ -200,10 +192,11 @@ class AsyncIndex(_BaseIndex):
200
192
  if not self.plugins or not self.plugins.delete_all_documents_plugins:
201
193
  return None
202
194
 
203
- plugins = []
204
- for plugin in self.plugins.delete_all_documents_plugins:
205
- if plugin.CONCURRENT_EVENT:
206
- plugins.append(plugin)
195
+ plugins = [
196
+ plugin
197
+ for plugin in self.plugins.delete_all_documents_plugins
198
+ if plugin.CONCURRENT_EVENT
199
+ ]
207
200
 
208
201
  if not plugins:
209
202
  return None
@@ -215,10 +208,9 @@ class AsyncIndex(_BaseIndex):
215
208
  if not self.plugins or not self.plugins.delete_all_documents_plugins:
216
209
  return None
217
210
 
218
- plugins = []
219
- for plugin in self.plugins.delete_all_documents_plugins:
220
- if plugin.POST_EVENT:
221
- plugins.append(plugin)
211
+ plugins = [
212
+ plugin for plugin in self.plugins.delete_all_documents_plugins if plugin.POST_EVENT
213
+ ]
222
214
 
223
215
  if not plugins:
224
216
  return None
@@ -230,10 +222,9 @@ class AsyncIndex(_BaseIndex):
230
222
  if not self.plugins or not self.plugins.delete_all_documents_plugins:
231
223
  return None
232
224
 
233
- plugins = []
234
- for plugin in self.plugins.delete_all_documents_plugins:
235
- if plugin.PRE_EVENT:
236
- plugins.append(plugin)
225
+ plugins = [
226
+ plugin for plugin in self.plugins.delete_all_documents_plugins if plugin.PRE_EVENT
227
+ ]
237
228
 
238
229
  if not plugins:
239
230
  return None
@@ -245,10 +236,9 @@ class AsyncIndex(_BaseIndex):
245
236
  if not self.plugins or not self.plugins.delete_document_plugins:
246
237
  return None
247
238
 
248
- plugins = []
249
- for plugin in self.plugins.delete_document_plugins:
250
- if plugin.CONCURRENT_EVENT:
251
- plugins.append(plugin)
239
+ plugins = [
240
+ plugin for plugin in self.plugins.delete_document_plugins if plugin.CONCURRENT_EVENT
241
+ ]
252
242
 
253
243
  if not plugins:
254
244
  return None
@@ -260,10 +250,7 @@ class AsyncIndex(_BaseIndex):
260
250
  if not self.plugins or not self.plugins.delete_document_plugins:
261
251
  return None
262
252
 
263
- plugins = []
264
- for plugin in self.plugins.delete_document_plugins:
265
- if plugin.POST_EVENT:
266
- plugins.append(plugin)
253
+ plugins = [plugin for plugin in self.plugins.delete_document_plugins if plugin.POST_EVENT]
267
254
 
268
255
  if not plugins:
269
256
  return None
@@ -275,10 +262,7 @@ class AsyncIndex(_BaseIndex):
275
262
  if not self.plugins or not self.plugins.delete_document_plugins:
276
263
  return None
277
264
 
278
- plugins = []
279
- for plugin in self.plugins.delete_document_plugins:
280
- if plugin.PRE_EVENT:
281
- plugins.append(plugin)
265
+ plugins = [plugin for plugin in self.plugins.delete_document_plugins if plugin.PRE_EVENT]
282
266
 
283
267
  if not plugins:
284
268
  return None
@@ -290,10 +274,9 @@ class AsyncIndex(_BaseIndex):
290
274
  if not self.plugins or not self.plugins.delete_documents_plugins:
291
275
  return None
292
276
 
293
- plugins = []
294
- for plugin in self.plugins.delete_documents_plugins:
295
- if plugin.CONCURRENT_EVENT:
296
- plugins.append(plugin)
277
+ plugins = [
278
+ plugin for plugin in self.plugins.delete_documents_plugins if plugin.CONCURRENT_EVENT
279
+ ]
297
280
 
298
281
  if not plugins:
299
282
  return None
@@ -305,10 +288,7 @@ class AsyncIndex(_BaseIndex):
305
288
  if not self.plugins or not self.plugins.delete_documents_plugins:
306
289
  return None
307
290
 
308
- plugins = []
309
- for plugin in self.plugins.delete_documents_plugins:
310
- if plugin.POST_EVENT:
311
- plugins.append(plugin)
291
+ plugins = [plugin for plugin in self.plugins.delete_documents_plugins if plugin.POST_EVENT]
312
292
 
313
293
  if not plugins:
314
294
  return None
@@ -320,10 +300,7 @@ class AsyncIndex(_BaseIndex):
320
300
  if not self.plugins or not self.plugins.delete_documents_plugins:
321
301
  return None
322
302
 
323
- plugins = []
324
- for plugin in self.plugins.delete_documents_plugins:
325
- if plugin.PRE_EVENT:
326
- plugins.append(plugin)
303
+ plugins = [plugin for plugin in self.plugins.delete_documents_plugins if plugin.PRE_EVENT]
327
304
 
328
305
  if not plugins:
329
306
  return None
@@ -335,10 +312,11 @@ class AsyncIndex(_BaseIndex):
335
312
  if not self.plugins or not self.plugins.delete_documents_by_filter_plugins:
336
313
  return None
337
314
 
338
- plugins = []
339
- for plugin in self.plugins.delete_documents_by_filter_plugins:
340
- if plugin.CONCURRENT_EVENT:
341
- plugins.append(plugin)
315
+ plugins = [
316
+ plugin
317
+ for plugin in self.plugins.delete_documents_by_filter_plugins
318
+ if plugin.CONCURRENT_EVENT
319
+ ]
342
320
 
343
321
  if not plugins:
344
322
  return None
@@ -350,10 +328,11 @@ class AsyncIndex(_BaseIndex):
350
328
  if not self.plugins or not self.plugins.delete_documents_by_filter_plugins:
351
329
  return None
352
330
 
353
- plugins = []
354
- for plugin in self.plugins.delete_documents_by_filter_plugins:
355
- if plugin.POST_EVENT:
356
- plugins.append(plugin)
331
+ plugins = [
332
+ plugin
333
+ for plugin in self.plugins.delete_documents_by_filter_plugins
334
+ if plugin.POST_EVENT
335
+ ]
357
336
 
358
337
  if not plugins:
359
338
  return None
@@ -365,10 +344,9 @@ class AsyncIndex(_BaseIndex):
365
344
  if not self.plugins or not self.plugins.delete_documents_by_filter_plugins:
366
345
  return None
367
346
 
368
- plugins = []
369
- for plugin in self.plugins.delete_documents_by_filter_plugins:
370
- if plugin.PRE_EVENT:
371
- plugins.append(plugin)
347
+ plugins = [
348
+ plugin for plugin in self.plugins.delete_documents_by_filter_plugins if plugin.PRE_EVENT
349
+ ]
372
350
 
373
351
  if not plugins:
374
352
  return None
@@ -380,10 +358,9 @@ class AsyncIndex(_BaseIndex):
380
358
  if not self.plugins or not self.plugins.facet_search_plugins:
381
359
  return None
382
360
 
383
- plugins = []
384
- for plugin in self.plugins.facet_search_plugins:
385
- if plugin.CONCURRENT_EVENT:
386
- plugins.append(plugin)
361
+ plugins = [
362
+ plugin for plugin in self.plugins.facet_search_plugins if plugin.CONCURRENT_EVENT
363
+ ]
387
364
 
388
365
  if not plugins:
389
366
  return None
@@ -395,10 +372,7 @@ class AsyncIndex(_BaseIndex):
395
372
  if not self.plugins or not self.plugins.facet_search_plugins:
396
373
  return None
397
374
 
398
- plugins = []
399
- for plugin in self.plugins.facet_search_plugins:
400
- if plugin.POST_EVENT:
401
- plugins.append(plugin)
375
+ plugins = [plugin for plugin in self.plugins.facet_search_plugins if plugin.POST_EVENT]
402
376
 
403
377
  if not plugins:
404
378
  return None
@@ -410,10 +384,7 @@ class AsyncIndex(_BaseIndex):
410
384
  if not self.plugins or not self.plugins.facet_search_plugins:
411
385
  return None
412
386
 
413
- plugins = []
414
- for plugin in self.plugins.facet_search_plugins:
415
- if plugin.PRE_EVENT:
416
- plugins.append(plugin)
387
+ plugins = [plugin for plugin in self.plugins.facet_search_plugins if plugin.PRE_EVENT]
417
388
 
418
389
  if not plugins:
419
390
  return None
@@ -425,10 +396,7 @@ class AsyncIndex(_BaseIndex):
425
396
  if not self.plugins or not self.plugins.search_plugins:
426
397
  return None
427
398
 
428
- plugins = []
429
- for plugin in self.plugins.search_plugins:
430
- if plugin.CONCURRENT_EVENT:
431
- plugins.append(plugin)
399
+ plugins = [plugin for plugin in self.plugins.search_plugins if plugin.CONCURRENT_EVENT]
432
400
 
433
401
  if not plugins:
434
402
  return None
@@ -440,10 +408,7 @@ class AsyncIndex(_BaseIndex):
440
408
  if not self.plugins or not self.plugins.search_plugins:
441
409
  return None
442
410
 
443
- plugins = []
444
- for plugin in self.plugins.search_plugins:
445
- if plugin.POST_EVENT:
446
- plugins.append(plugin)
411
+ plugins = [plugin for plugin in self.plugins.search_plugins if plugin.POST_EVENT]
447
412
 
448
413
  if not plugins:
449
414
  return None
@@ -455,10 +420,7 @@ class AsyncIndex(_BaseIndex):
455
420
  if not self.plugins or not self.plugins.search_plugins:
456
421
  return None
457
422
 
458
- plugins = []
459
- for plugin in self.plugins.search_plugins:
460
- if plugin.PRE_EVENT:
461
- plugins.append(plugin)
423
+ plugins = [plugin for plugin in self.plugins.search_plugins if plugin.PRE_EVENT]
462
424
 
463
425
  if not plugins:
464
426
  return None
@@ -472,10 +434,9 @@ class AsyncIndex(_BaseIndex):
472
434
  if not self.plugins or not self.plugins.update_documents_plugins:
473
435
  return None
474
436
 
475
- plugins = []
476
- for plugin in self.plugins.update_documents_plugins:
477
- if plugin.CONCURRENT_EVENT:
478
- plugins.append(plugin)
437
+ plugins = [
438
+ plugin for plugin in self.plugins.update_documents_plugins if plugin.CONCURRENT_EVENT
439
+ ]
479
440
 
480
441
  if not plugins:
481
442
  return None
@@ -487,10 +448,7 @@ class AsyncIndex(_BaseIndex):
487
448
  if not self.plugins or not self.plugins.update_documents_plugins:
488
449
  return None
489
450
 
490
- plugins = []
491
- for plugin in self.plugins.update_documents_plugins:
492
- if plugin.POST_EVENT:
493
- plugins.append(plugin)
451
+ plugins = [plugin for plugin in self.plugins.update_documents_plugins if plugin.POST_EVENT]
494
452
 
495
453
  if not plugins:
496
454
  return None
@@ -502,10 +460,7 @@ class AsyncIndex(_BaseIndex):
502
460
  if not self.plugins or not self.plugins.update_documents_plugins:
503
461
  return None
504
462
 
505
- plugins = []
506
- for plugin in self.plugins.update_documents_plugins:
507
- if plugin.PRE_EVENT:
508
- plugins.append(plugin)
463
+ plugins = [plugin for plugin in self.plugins.update_documents_plugins if plugin.PRE_EVENT]
509
464
 
510
465
  if not plugins:
511
466
  return None
@@ -516,16 +471,13 @@ class AsyncIndex(_BaseIndex):
516
471
  """Deletes the index.
517
472
 
518
473
  Returns:
519
-
520
474
  The details of the task.
521
475
 
522
476
  Raises:
523
-
524
477
  MeilisearchCommunicationError: If there was an error communicating with the server.
525
478
  MeilisearchApiError: If the Meilisearch API returned an error.
526
479
 
527
- Examples:
528
-
480
+ Examples
529
481
  >>> from meilisearch_python_sdk import AsyncClient
530
482
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
531
483
  >>> index = client.index("movies")
@@ -538,16 +490,13 @@ class AsyncIndex(_BaseIndex):
538
490
  """Delete the index if it already exists.
539
491
 
540
492
  Returns:
541
-
542
493
  True if the index was deleted or False if not.
543
494
 
544
495
  Raises:
545
-
546
496
  MeilisearchCommunicationError: If there was an error communicating with the server.
547
497
  MeilisearchApiError: If the Meilisearch API returned an error.
548
498
 
549
- Examples:
550
-
499
+ Examples
551
500
  >>> from meilisearch_python_sdk import AsyncClient
552
501
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
553
502
  >>> index = client.index("movies")
@@ -566,20 +515,16 @@ class AsyncIndex(_BaseIndex):
566
515
  """Update the index primary key.
567
516
 
568
517
  Args:
569
-
570
518
  primary_key: The primary key of the documents.
571
519
 
572
520
  Returns:
573
-
574
521
  An instance of the AsyncIndex with the updated information.
575
522
 
576
523
  Raises:
577
-
578
524
  MeilisearchCommunicationError: If there was an error communicating with the server.
579
525
  MeilisearchApiError: If the Meilisearch API returned an error.
580
526
 
581
- Examples:
582
-
527
+ Examples
583
528
  >>> from meilisearch_python_sdk import AsyncClient
584
529
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
585
530
  >>> index = client.index("movies")
@@ -598,16 +543,13 @@ class AsyncIndex(_BaseIndex):
598
543
  """Gets the infromation about the index.
599
544
 
600
545
  Returns:
601
-
602
546
  An instance of the AsyncIndex containing the retrieved information.
603
547
 
604
548
  Raises:
605
-
606
549
  MeilisearchCommunicationError: If there was an error communicating with the server.
607
550
  MeilisearchApiError: If the Meilisearch API returned an error.
608
551
 
609
- Examples:
610
-
552
+ Examples
611
553
  >>> from meilisearch_python_sdk import AsyncClient
612
554
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
613
555
  >>> index = client.index("movies")
@@ -624,16 +566,13 @@ class AsyncIndex(_BaseIndex):
624
566
  """Get the primary key.
625
567
 
626
568
  Returns:
627
-
628
569
  The primary key for the documents in the index.
629
570
 
630
571
  Raises:
631
-
632
572
  MeilisearchCommunicationError: If there was an error communicating with the server.
633
573
  MeilisearchApiError: If the Meilisearch API returned an error.
634
574
 
635
- Examples:
636
-
575
+ Examples
637
576
  >>> from meilisearch_python_sdk import AsyncClient
638
577
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
639
578
  >>> index = client.index("movies")
@@ -662,7 +601,6 @@ class AsyncIndex(_BaseIndex):
662
601
  through the `Client`.
663
602
 
664
603
  Args:
665
-
666
604
  http_client: An instance of the AsyncClient. This automatically gets passed by the
667
605
  Client when creating an AsyncIndex instance.
668
606
  uid: The index's unique identifier.
@@ -687,16 +625,13 @@ class AsyncIndex(_BaseIndex):
687
625
  JsonDict
688
626
 
689
627
  Returns:
690
-
691
628
  An instance of AsyncIndex containing the information of the newly created index.
692
629
 
693
630
  Raises:
694
-
695
631
  MeilisearchCommunicationError: If there was an error communicating with the server.
696
632
  MeilisearchApiError: If the Meilisearch API returned an error.
697
633
 
698
- Examples:
699
-
634
+ Examples
700
635
  >>> from meilisearch_python_sdk import AsyncClient
701
636
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
702
637
  >>> index = await index.create(client, "movies")
@@ -742,16 +677,13 @@ class AsyncIndex(_BaseIndex):
742
677
  """Get stats of the index.
743
678
 
744
679
  Returns:
745
-
746
680
  Stats of the index.
747
681
 
748
682
  Raises:
749
-
750
683
  MeilisearchCommunicationError: If there was an error communicating with the server.
751
684
  MeilisearchApiError: If the Meilisearch API returned an error.
752
685
 
753
- Examples:
754
-
686
+ Examples
755
687
  >>> from meilisearch_python_sdk import AsyncClient
756
688
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
757
689
  >>> index = client.index("movies")
@@ -793,7 +725,6 @@ class AsyncIndex(_BaseIndex):
793
725
  """Search the index.
794
726
 
795
727
  Args:
796
-
797
728
  query: String containing the word(s) to search
798
729
  offset: Number of documents to skip. Defaults to 0.
799
730
  limit: Maximum number of documents returned. Defaults to 20.
@@ -852,16 +783,13 @@ class AsyncIndex(_BaseIndex):
852
783
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
853
784
 
854
785
  Returns:
855
-
856
786
  Results of the search
857
787
 
858
788
  Raises:
859
-
860
789
  MeilisearchCommunicationError: If there was an error communicating with the server.
861
790
  MeilisearchApiError: If the Meilisearch API returned an error.
862
791
 
863
- Examples:
864
-
792
+ Examples
865
793
  >>> from meilisearch_python_sdk import AsyncClient
866
794
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
867
795
  >>> index = client.index("movies")
@@ -1062,7 +990,6 @@ class AsyncIndex(_BaseIndex):
1062
990
  """Search the index.
1063
991
 
1064
992
  Args:
1065
-
1066
993
  query: String containing the word(s) to search
1067
994
  facet_name: The name of the facet to search
1068
995
  facet_query: The facet search value
@@ -1113,16 +1040,13 @@ class AsyncIndex(_BaseIndex):
1113
1040
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
1114
1041
 
1115
1042
  Returns:
1116
-
1117
1043
  Results of the search
1118
1044
 
1119
1045
  Raises:
1120
-
1121
1046
  MeilisearchCommunicationError: If there was an error communicating with the server.
1122
1047
  MeilisearchApiError: If the Meilisearch API returned an error.
1123
1048
 
1124
- Examples:
1125
-
1049
+ Examples
1126
1050
  >>> from meilisearch_python_sdk import AsyncClient
1127
1051
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
1128
1052
  >>> index = client.index("movies")
@@ -1324,16 +1248,13 @@ class AsyncIndex(_BaseIndex):
1324
1248
  to None.
1325
1249
 
1326
1250
  Returns:
1327
-
1328
1251
  Results of the search
1329
1252
 
1330
1253
  Raises:
1331
-
1332
1254
  MeilisearchCommunicationError: If there was an error communicating with the server.
1333
1255
  MeilisearchApiError: If the Meilisearch API returned an error.
1334
1256
 
1335
- Examples:
1336
-
1257
+ Examples
1337
1258
  >>> from meilisearch_python_sdk import AsyncClient
1338
1259
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
1339
1260
  >>> index = client.index("movies")
@@ -1365,20 +1286,16 @@ class AsyncIndex(_BaseIndex):
1365
1286
  """Get one document with given document identifier.
1366
1287
 
1367
1288
  Args:
1368
-
1369
1289
  document_id: Unique identifier of the document.
1370
1290
 
1371
1291
  Returns:
1372
-
1373
1292
  The document information
1374
1293
 
1375
1294
  Raises:
1376
-
1377
1295
  MeilisearchCommunicationError: If there was an error communicating with the server.
1378
1296
  MeilisearchApiError: If the Meilisearch API returned an error.
1379
1297
 
1380
- Examples:
1381
-
1298
+ Examples
1382
1299
  >>> from meilisearch_python_sdk import AsyncClient
1383
1300
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
1384
1301
  >>> index = client.index("movies")
@@ -1399,7 +1316,6 @@ class AsyncIndex(_BaseIndex):
1399
1316
  """Get a batch documents from the index.
1400
1317
 
1401
1318
  Args:
1402
-
1403
1319
  offset: Number of documents to skip. Defaults to 0.
1404
1320
  limit: Maximum number of documents returnedd. Defaults to 20.
1405
1321
  fields: Document attributes to show. If this value is None then all
@@ -1408,17 +1324,14 @@ class AsyncIndex(_BaseIndex):
1408
1324
  used with Meilisearch >= v1.2.0
1409
1325
 
1410
1326
  Returns:
1411
-
1412
1327
  Documents info.
1413
1328
 
1414
1329
  Raises:
1415
-
1416
1330
  MeilisearchCommunicationError: If there was an error communicating with the server.
1417
1331
  MeilisearchApiError: If the Meilisearch API returned an error.
1418
1332
 
1419
1333
 
1420
- Examples:
1421
-
1334
+ Examples
1422
1335
  >>> from meilisearch_python_sdk import AsyncClient
1423
1336
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
1424
1337
  >>> index = client.index("movies")
@@ -1457,23 +1370,19 @@ class AsyncIndex(_BaseIndex):
1457
1370
  """Add documents to the index.
1458
1371
 
1459
1372
  Args:
1460
-
1461
1373
  documents: List of documents.
1462
1374
  primary_key: The primary key of the documents. This will be ignored if already set.
1463
1375
  Defaults to None.
1464
1376
  compress: If set to True the data will be sent in gzip format. Defaults to False.
1465
1377
 
1466
1378
  Returns:
1467
-
1468
1379
  The details of the task.
1469
1380
 
1470
1381
  Raises:
1471
-
1472
1382
  MeilisearchCommunicationError: If there was an error communicating with the server.
1473
1383
  MeilisearchApiError: If the Meilisearch API returned an error.
1474
1384
 
1475
- Examples:
1476
-
1385
+ Examples
1477
1386
  >>> from meilisearch_python_sdk import AsyncClient
1478
1387
  >>> documents = [
1479
1388
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -1601,7 +1510,6 @@ class AsyncIndex(_BaseIndex):
1601
1510
  """Adds documents in batches to reduce RAM usage with indexing.
1602
1511
 
1603
1512
  Args:
1604
-
1605
1513
  documents: List of documents.
1606
1514
  batch_size: The number of documents that should be included in each batch.
1607
1515
  Defaults to 1000.
@@ -1613,16 +1521,13 @@ class AsyncIndex(_BaseIndex):
1613
1521
  server with requests. Defaults to None.
1614
1522
 
1615
1523
  Returns:
1616
-
1617
1524
  List of update ids to track the action.
1618
1525
 
1619
1526
  Raises:
1620
-
1621
1527
  MeilisearchCommunicationError: If there was an error communicating with the server.
1622
1528
  MeilisearchApiError: If the Meilisearch API returned an error.
1623
1529
 
1624
- Examples:
1625
-
1530
+ Examples
1626
1531
  >>> from meilisearch_python_sdk import AsyncClient
1627
1532
  >>> >>> documents = [
1628
1533
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -1678,7 +1583,6 @@ class AsyncIndex(_BaseIndex):
1678
1583
  """Load all json files from a directory and add the documents to the index.
1679
1584
 
1680
1585
  Args:
1681
-
1682
1586
  directory_path: Path to the directory that contains the json files.
1683
1587
  primary_key: The primary key of the documents. This will be ignored if already set.
1684
1588
  Defaults to None.
@@ -1695,18 +1599,15 @@ class AsyncIndex(_BaseIndex):
1695
1599
  server with requests. Defaults to None.
1696
1600
 
1697
1601
  Returns:
1698
-
1699
1602
  The details of the task status.
1700
1603
 
1701
1604
  Raises:
1702
-
1703
1605
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
1704
1606
  MeilisearchError: If the file path is not valid
1705
1607
  MeilisearchCommunicationError: If there was an error communicating with the server.
1706
1608
  MeilisearchApiError: If the Meilisearch API returned an error.
1707
1609
 
1708
- Examples:
1709
-
1610
+ Examples
1710
1611
  >>> from pathlib import Path
1711
1612
  >>> from meilisearch_python_sdk import AsyncClient
1712
1613
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -1844,7 +1745,6 @@ class AsyncIndex(_BaseIndex):
1844
1745
  """Load all json files from a directory and add the documents to the index in batches.
1845
1746
 
1846
1747
  Args:
1847
-
1848
1748
  directory_path: Path to the directory that contains the json files.
1849
1749
  batch_size: The number of documents that should be included in each batch.
1850
1750
  Defaults to 1000.
@@ -1863,18 +1763,15 @@ class AsyncIndex(_BaseIndex):
1863
1763
  server with requests. Defaults to None.
1864
1764
 
1865
1765
  Returns:
1866
-
1867
1766
  List of update ids to track the action.
1868
1767
 
1869
1768
  Raises:
1870
-
1871
1769
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
1872
1770
  MeilisearchError: If the file path is not valid
1873
1771
  MeilisearchCommunicationError: If there was an error communicating with the server.
1874
1772
  MeilisearchApiError: If the Meilisearch API returned an error.
1875
1773
 
1876
- Examples:
1877
-
1774
+ Examples
1878
1775
  >>> from pathlib import Path
1879
1776
  >>> from meilisearch_python_sdk import AsyncClient
1880
1777
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -1947,25 +1844,21 @@ class AsyncIndex(_BaseIndex):
1947
1844
  """Add documents to the index from a json file.
1948
1845
 
1949
1846
  Args:
1950
-
1951
1847
  file_path: Path to the json file.
1952
1848
  primary_key: The primary key of the documents. This will be ignored if already set.
1953
1849
  Defaults to None.
1954
1850
  compress: If set to True the data will be sent in gzip format. Defaults to False.
1955
1851
 
1956
1852
  Returns:
1957
-
1958
1853
  The details of the task status.
1959
1854
 
1960
1855
  Raises:
1961
-
1962
1856
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
1963
1857
  MeilisearchError: If the file path is not valid
1964
1858
  MeilisearchCommunicationError: If there was an error communicating with the server.
1965
1859
  MeilisearchApiError: If the Meilisearch API returned an error.
1966
1860
 
1967
- Examples:
1968
-
1861
+ Examples
1969
1862
  >>> from pathlib import Path
1970
1863
  >>> from meilisearch_python_sdk import AsyncClient
1971
1864
  >>> file_path = Path("/path/to/file.json")
@@ -1992,7 +1885,6 @@ class AsyncIndex(_BaseIndex):
1992
1885
  """Adds documents form a json file in batches to reduce RAM usage with indexing.
1993
1886
 
1994
1887
  Args:
1995
-
1996
1888
  file_path: Path to the json file.
1997
1889
  batch_size: The number of documents that should be included in each batch.
1998
1890
  Defaults to 1000.
@@ -2006,18 +1898,15 @@ class AsyncIndex(_BaseIndex):
2006
1898
  server with requests. Defaults to None.
2007
1899
 
2008
1900
  Returns:
2009
-
2010
1901
  List of update ids to track the action.
2011
1902
 
2012
1903
  Raises:
2013
-
2014
1904
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
2015
1905
  MeilisearchError: If the file path is not valid
2016
1906
  MeilisearchCommunicationError: If there was an error communicating with the server.
2017
1907
  MeilisearchApiError: If the Meilisearch API returned an error.
2018
1908
 
2019
- Examples:
2020
-
1909
+ Examples
2021
1910
  >>> from pathlib import Path
2022
1911
  >>> from meilisearch_python_sdk import AsyncClient
2023
1912
  >>> file_path = Path("/path/to/file.json")
@@ -2051,7 +1940,6 @@ class AsyncIndex(_BaseIndex):
2051
1940
  for batching.
2052
1941
 
2053
1942
  Args:
2054
-
2055
1943
  file_path: The path to the file to send to Meilisearch. Only csv and ndjson files are
2056
1944
  allowed.
2057
1945
  primary_key: The primary key of the documents. This will be ignored if already set.
@@ -2061,19 +1949,16 @@ class AsyncIndex(_BaseIndex):
2061
1949
  compress: If set to True the data will be sent in gzip format. Defaults to False.
2062
1950
 
2063
1951
  Returns:
2064
-
2065
1952
  The details of the task.
2066
1953
 
2067
1954
  Raises:
2068
-
2069
1955
  ValueError: If the file is not a csv or ndjson file, or if a csv_delimiter is sent for
2070
1956
  a non-csv file.
2071
1957
  MeilisearchError: If the file path is not valid
2072
1958
  MeilisearchCommunicationError: If there was an error communicating with the server.
2073
1959
  MeilisearchApiError: If the Meilisearch API returned an error.
2074
1960
 
2075
- Examples:
2076
-
1961
+ Examples
2077
1962
  >>> from pathlib import Path
2078
1963
  >>> from meilisearch_python_sdk import AsyncClient
2079
1964
  >>> file_path = Path("/path/to/file.csv")
@@ -2131,23 +2016,19 @@ class AsyncIndex(_BaseIndex):
2131
2016
  sending a PATCH request to /experimental-features with { "editDocumentsByFunction": true }.
2132
2017
 
2133
2018
  Args:
2134
-
2135
2019
  function: Rhai function to use to update the documents.
2136
2020
  context: Parameters to use in the function. Defaults to None.
2137
2021
  filter: Filter the documents before applying the function. Defaults to None.
2138
2022
 
2139
2023
  Returns:
2140
-
2141
2024
  The details of the task.
2142
2025
 
2143
2026
  Raises:
2144
-
2145
2027
  MeilisearchError: If the file path is not valid
2146
2028
  MeilisearchCommunicationError: If there was an error communicating with the server.
2147
2029
  MeilisearchApiError: If the Meilisearch API returned an error.
2148
2030
 
2149
- Examples:
2150
-
2031
+ Examples
2151
2032
  >>> from meilisearch_python_sdk import AsyncClient
2152
2033
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
2153
2034
  >>> index = client.index("movies")
@@ -2176,23 +2057,19 @@ class AsyncIndex(_BaseIndex):
2176
2057
  """Update documents in the index.
2177
2058
 
2178
2059
  Args:
2179
-
2180
2060
  documents: List of documents.
2181
2061
  primary_key: The primary key of the documents. This will be ignored if already set.
2182
2062
  Defaults to None.
2183
2063
  compress: If set to True the data will be sent in gzip format. Defaults to False.
2184
2064
 
2185
2065
  Returns:
2186
-
2187
2066
  The details of the task.
2188
2067
 
2189
2068
  Raises:
2190
-
2191
2069
  MeilisearchCommunicationError: If there was an error communicating with the server.
2192
2070
  MeilisearchApiError: If the Meilisearch API returned an error.
2193
2071
 
2194
- Examples:
2195
-
2072
+ Examples
2196
2073
  >>> from meilisearch_python_sdk import AsyncClient
2197
2074
  >>> documents = [
2198
2075
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -2323,7 +2200,6 @@ class AsyncIndex(_BaseIndex):
2323
2200
  Each batch tries to fill the max_payload_size
2324
2201
 
2325
2202
  Args:
2326
-
2327
2203
  documents: List of documents.
2328
2204
  batch_size: The number of documents that should be included in each batch.
2329
2205
  Defaults to 1000.
@@ -2335,16 +2211,13 @@ class AsyncIndex(_BaseIndex):
2335
2211
  server with requests. Defaults to None.
2336
2212
 
2337
2213
  Returns:
2338
-
2339
2214
  List of update ids to track the action.
2340
2215
 
2341
2216
  Raises:
2342
-
2343
2217
  MeilisearchCommunicationError: If there was an error communicating with the server.
2344
2218
  MeilisearchApiError: If the Meilisearch API returned an error.
2345
2219
 
2346
- Examples:
2347
-
2220
+ Examples
2348
2221
  >>> from meilisearch_python_sdk import AsyncClient
2349
2222
  >>> documents = [
2350
2223
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -2397,7 +2270,6 @@ class AsyncIndex(_BaseIndex):
2397
2270
  """Load all json files from a directory and update the documents.
2398
2271
 
2399
2272
  Args:
2400
-
2401
2273
  directory_path: Path to the directory that contains the json files.
2402
2274
  primary_key: The primary key of the documents. This will be ignored if already set.
2403
2275
  Defaults to None.
@@ -2411,18 +2283,15 @@ class AsyncIndex(_BaseIndex):
2411
2283
  compress: If set to True the data will be sent in gzip format. Defaults to False.
2412
2284
 
2413
2285
  Returns:
2414
-
2415
2286
  The details of the task status.
2416
2287
 
2417
2288
  Raises:
2418
-
2419
2289
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
2420
2290
  MeilisearchError: If the file path is not valid
2421
2291
  MeilisearchCommunicationError: If there was an error communicating with the server.
2422
2292
  MeilisearchApiError: If the Meilisearch API returned an error.
2423
2293
 
2424
- Examples:
2425
-
2294
+ Examples
2426
2295
  >>> from pathlib import Path
2427
2296
  >>> from meilisearch_python_sdk import AsyncClient
2428
2297
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -2511,7 +2380,6 @@ class AsyncIndex(_BaseIndex):
2511
2380
  """Load all json files from a directory and update the documents.
2512
2381
 
2513
2382
  Args:
2514
-
2515
2383
  directory_path: Path to the directory that contains the json files.
2516
2384
  batch_size: The number of documents that should be included in each batch.
2517
2385
  Defaults to 1000.
@@ -2530,18 +2398,15 @@ class AsyncIndex(_BaseIndex):
2530
2398
  server with requests. Defaults to None.
2531
2399
 
2532
2400
  Returns:
2533
-
2534
2401
  List of update ids to track the action.
2535
2402
 
2536
2403
  Raises:
2537
-
2538
2404
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
2539
2405
  MeilisearchError: If the file path is not valid
2540
2406
  MeilisearchCommunicationError: If there was an error communicating with the server.
2541
2407
  MeilisearchApiError: If the Meilisearch API returned an error.
2542
2408
 
2543
- Examples:
2544
-
2409
+ Examples
2545
2410
  >>> from pathlib import Path
2546
2411
  >>> from meilisearch_python_sdk import AsyncClient
2547
2412
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -2649,7 +2514,6 @@ class AsyncIndex(_BaseIndex):
2649
2514
  """Add documents in the index from a json file.
2650
2515
 
2651
2516
  Args:
2652
-
2653
2517
  file_path: Path to the json file.
2654
2518
  primary_key: The primary key of the documents. This will be ignored if already set.
2655
2519
  Defaults to None.
@@ -2658,16 +2522,13 @@ class AsyncIndex(_BaseIndex):
2658
2522
  compress: If set to True the data will be sent in gzip format. Defaults to False.
2659
2523
 
2660
2524
  Returns:
2661
-
2662
2525
  The details of the task status.
2663
2526
 
2664
2527
  Raises:
2665
-
2666
2528
  MeilisearchCommunicationError: If there was an error communicating with the server.
2667
2529
  MeilisearchApiError: If the Meilisearch API returned an error.
2668
2530
 
2669
- Examples:
2670
-
2531
+ Examples
2671
2532
  >>> from pathlib import Path
2672
2533
  >>> from meilisearch_python_sdk import AsyncClient
2673
2534
  >>> file_path = Path("/path/to/file.json")
@@ -2693,7 +2554,6 @@ class AsyncIndex(_BaseIndex):
2693
2554
  """Updates documents form a json file in batches to reduce RAM usage with indexing.
2694
2555
 
2695
2556
  Args:
2696
-
2697
2557
  file_path: Path to the json file.
2698
2558
  batch_size: The number of documents that should be included in each batch.
2699
2559
  Defaults to 1000.
@@ -2705,16 +2565,13 @@ class AsyncIndex(_BaseIndex):
2705
2565
  server with requests. Defaults to None.
2706
2566
 
2707
2567
  Returns:
2708
-
2709
2568
  List of update ids to track the action.
2710
2569
 
2711
2570
  Raises:
2712
-
2713
2571
  MeilisearchCommunicationError: If there was an error communicating with the server.
2714
2572
  MeilisearchApiError: If the Meilisearch API returned an error.
2715
2573
 
2716
- Examples:
2717
-
2574
+ Examples
2718
2575
  >>> from pathlib import Path
2719
2576
  >>> from meilisearch_python_sdk import AsyncClient
2720
2577
  >>> file_path = Path("/path/to/file.json")
@@ -2748,7 +2605,6 @@ class AsyncIndex(_BaseIndex):
2748
2605
  for batching.
2749
2606
 
2750
2607
  Args:
2751
-
2752
2608
  file_path: The path to the file to send to Meilisearch. Only csv and ndjson files are
2753
2609
  allowed.
2754
2610
  primary_key: The primary key of the documents. This will be ignored if already set.
@@ -2758,19 +2614,16 @@ class AsyncIndex(_BaseIndex):
2758
2614
  compress: If set to True the data will be sent in gzip format. Defaults to False.
2759
2615
 
2760
2616
  Returns:
2761
-
2762
2617
  The details of the task status.
2763
2618
 
2764
2619
  Raises:
2765
-
2766
2620
  ValueError: If the file is not a csv or ndjson file, or if a csv_delimiter is sent for
2767
2621
  a non-csv file.
2768
2622
  MeilisearchError: If the file path is not valid
2769
2623
  MeilisearchCommunicationError: If there was an error communicating with the server.
2770
2624
  MeilisearchApiError: If the Meilisearch API returned an error.
2771
2625
 
2772
- Examples:
2773
-
2626
+ Examples
2774
2627
  >>> from pathlib import Path
2775
2628
  >>> from meilisearch_python_sdk import AsyncClient
2776
2629
  >>> file_path = Path("/path/to/file.csv")
@@ -2822,20 +2675,16 @@ class AsyncIndex(_BaseIndex):
2822
2675
  """Delete one document from the index.
2823
2676
 
2824
2677
  Args:
2825
-
2826
2678
  document_id: Unique identifier of the document.
2827
2679
 
2828
2680
  Returns:
2829
-
2830
2681
  The details of the task status.
2831
2682
 
2832
2683
  Raises:
2833
-
2834
2684
  MeilisearchCommunicationError: If there was an error communicating with the server.
2835
2685
  MeilisearchApiError: If the Meilisearch API returned an error.
2836
2686
 
2837
- Examples:
2838
-
2687
+ Examples
2839
2688
  >>> from meilisearch_python_sdk import AsyncClient
2840
2689
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
2841
2690
  >>> index = client.index("movies")
@@ -2901,20 +2750,16 @@ class AsyncIndex(_BaseIndex):
2901
2750
  """Delete multiple documents from the index.
2902
2751
 
2903
2752
  Args:
2904
-
2905
2753
  ids: List of unique identifiers of documents.
2906
2754
 
2907
2755
  Returns:
2908
-
2909
2756
  List of update ids to track the action.
2910
2757
 
2911
2758
  Raises:
2912
-
2913
2759
  MeilisearchCommunicationError: If there was an error communicating with the server.
2914
2760
  MeilisearchApiError: If the Meilisearch API returned an error.
2915
2761
 
2916
- Examples:
2917
-
2762
+ Examples
2918
2763
  >>> from meilisearch_python_sdk import AsyncClient
2919
2764
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
2920
2765
  >>> index = client.index("movies")
@@ -2976,20 +2821,16 @@ class AsyncIndex(_BaseIndex):
2976
2821
  """Delete documents from the index by filter.
2977
2822
 
2978
2823
  Args:
2979
-
2980
2824
  filter: The filter value information.
2981
2825
 
2982
2826
  Returns:
2983
-
2984
2827
  The details of the task status.
2985
2828
 
2986
2829
  Raises:
2987
-
2988
2830
  MeilisearchCommunicationError: If there was an error communicating with the server.
2989
2831
  MeilisearchApiError: If the Meilisearch API returned an error.
2990
2832
 
2991
- Examples:
2992
-
2833
+ Examples
2993
2834
  >>> from meilisearch_pyrhon_sdk import AsyncClient
2994
2835
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
2995
2836
  >>> index = client.index("movies")
@@ -3057,23 +2898,19 @@ class AsyncIndex(_BaseIndex):
3057
2898
  """Delete batches of documents from the index by filter.
3058
2899
 
3059
2900
  Args:
3060
-
3061
2901
  filters: A list of filter value information.
3062
2902
  concurrency_limit: If set this will limit the number of batches that will be sent
3063
2903
  concurrently. This can be helpful if you find you are overloading the Meilisearch
3064
2904
  server with requests. Defaults to None.
3065
2905
 
3066
2906
  Returns:
3067
-
3068
2907
  The a list of details of the task statuses.
3069
2908
 
3070
2909
  Raises:
3071
-
3072
2910
  MeilisearchCommunicationError: If there was an error communicating with the server.
3073
2911
  MeilisearchApiError: If the Meilisearch API returned an error.
3074
2912
 
3075
- Examples:
3076
-
2913
+ Examples
3077
2914
  >>> from meilisearch_python_sdk import AsyncClient
3078
2915
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3079
2916
  >>> index = client.index("movies")
@@ -3113,16 +2950,13 @@ class AsyncIndex(_BaseIndex):
3113
2950
  """Delete all documents from the index.
3114
2951
 
3115
2952
  Returns:
3116
-
3117
2953
  The details of the task status.
3118
2954
 
3119
2955
  Raises:
3120
-
3121
2956
  MeilisearchCommunicationError: If there was an error communicating with the server.
3122
2957
  MeilisearchApiError: If the Meilisearch API returned an error.
3123
2958
 
3124
- Examples:
3125
-
2959
+ Examples
3126
2960
  >>> from meilisearch_python_sdk import AsyncClient
3127
2961
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3128
2962
  >>> index = client.index("movies")
@@ -3179,16 +3013,13 @@ class AsyncIndex(_BaseIndex):
3179
3013
  """Get settings of the index.
3180
3014
 
3181
3015
  Returns:
3182
-
3183
3016
  Settings of the index.
3184
3017
 
3185
3018
  Raises:
3186
-
3187
3019
  MeilisearchCommunicationError: If there was an error communicating with the server.
3188
3020
  MeilisearchApiError: If the Meilisearch API returned an error.
3189
3021
 
3190
- Examples:
3191
-
3022
+ Examples
3192
3023
  >>> from meilisearch_python_sdk import AsyncClient
3193
3024
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3194
3025
  >>> index = client.index("movies")
@@ -3212,21 +3043,17 @@ class AsyncIndex(_BaseIndex):
3212
3043
  """Update settings of the index.
3213
3044
 
3214
3045
  Args:
3215
-
3216
3046
  body: Settings of the index.
3217
3047
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3218
3048
 
3219
3049
  Returns:
3220
-
3221
3050
  The details of the task status.
3222
3051
 
3223
3052
  Raises:
3224
-
3225
3053
  MeilisearchCommunicationError: If there was an error communicating with the server.
3226
3054
  MeilisearchApiError: If the Meilisearch API returned an error.
3227
3055
 
3228
- Examples:
3229
-
3056
+ Examples
3230
3057
  >>> from meilisearch_python_sdk import AsyncClient
3231
3058
  >>> from meilisearch_python_sdk import MeilisearchSettings
3232
3059
  >>> new_settings = MeilisearchSettings(
@@ -3252,7 +3079,11 @@ class AsyncIndex(_BaseIndex):
3252
3079
  >>> index = client.index("movies")
3253
3080
  >>> await index.update_settings(new_settings)
3254
3081
  """
3255
- body_dict = {k: v for k, v in body.model_dump(by_alias=True).items() if v is not None}
3082
+ body_dict = {
3083
+ k: v
3084
+ for k, v in body.model_dump(by_alias=True, exclude_none=True).items()
3085
+ if v is not None
3086
+ }
3256
3087
  response = await self._http_requests.patch(self._settings_url, body_dict, compress=compress)
3257
3088
 
3258
3089
  return TaskInfo(**response.json())
@@ -3261,16 +3092,13 @@ class AsyncIndex(_BaseIndex):
3261
3092
  """Reset settings of the index to default values.
3262
3093
 
3263
3094
  Returns:
3264
-
3265
3095
  The details of the task status.
3266
3096
 
3267
3097
  Raises:
3268
-
3269
3098
  MeilisearchCommunicationError: If there was an error communicating with the server.
3270
3099
  MeilisearchApiError: If the Meilisearch API returned an error.
3271
3100
 
3272
- Examples:
3273
-
3101
+ Examples
3274
3102
  >>> from meilisearch_python_sdk import AsyncClient
3275
3103
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3276
3104
  >>> index = client.index("movies")
@@ -3284,16 +3112,13 @@ class AsyncIndex(_BaseIndex):
3284
3112
  """Get ranking rules of the index.
3285
3113
 
3286
3114
  Returns:
3287
-
3288
3115
  List containing the ranking rules of the index.
3289
3116
 
3290
3117
  Raises:
3291
-
3292
3118
  MeilisearchCommunicationError: If there was an error communicating with the server.
3293
3119
  MeilisearchApiError: If the Meilisearch API returned an error.
3294
3120
 
3295
- Examples:
3296
-
3121
+ Examples
3297
3122
  >>> from meilisearch_python_sdk import AsyncClient
3298
3123
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3299
3124
  >>> index = client.index("movies")
@@ -3309,21 +3134,17 @@ class AsyncIndex(_BaseIndex):
3309
3134
  """Update ranking rules of the index.
3310
3135
 
3311
3136
  Args:
3312
-
3313
3137
  ranking_rules: List containing the ranking rules.
3314
3138
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3315
3139
 
3316
3140
  Returns:
3317
-
3318
3141
  The details of the task status.
3319
3142
 
3320
3143
  Raises:
3321
-
3322
3144
  MeilisearchCommunicationError: If there was an error communicating with the server.
3323
3145
  MeilisearchApiError: If the Meilisearch API returned an error.
3324
3146
 
3325
- Examples:
3326
-
3147
+ Examples
3327
3148
  >>> from meilisearch_python_sdk import AsyncClient
3328
3149
  >>> ranking_rules=[
3329
3150
  >>> "words",
@@ -3349,16 +3170,13 @@ class AsyncIndex(_BaseIndex):
3349
3170
  """Reset ranking rules of the index to default values.
3350
3171
 
3351
3172
  Returns:
3352
-
3353
3173
  The details of the task status.
3354
3174
 
3355
3175
  Raises:
3356
-
3357
3176
  MeilisearchCommunicationError: If there was an error communicating with the server.
3358
3177
  MeilisearchApiError: If the Meilisearch API returned an error.
3359
3178
 
3360
- Examples:
3361
-
3179
+ Examples
3362
3180
  >>> from meilisearch_python_sdk import AsyncClient
3363
3181
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3364
3182
  >>> index = client.index("movies")
@@ -3372,17 +3190,14 @@ class AsyncIndex(_BaseIndex):
3372
3190
  """Get distinct attribute of the index.
3373
3191
 
3374
3192
  Returns:
3375
-
3376
3193
  String containing the distinct attribute of the index. If no distinct attribute
3377
3194
  `None` is returned.
3378
3195
 
3379
3196
  Raises:
3380
-
3381
3197
  MeilisearchCommunicationError: If there was an error communicating with the server.
3382
3198
  MeilisearchApiError: If the Meilisearch API returned an error.
3383
3199
 
3384
- Examples:
3385
-
3200
+ Examples
3386
3201
  >>> from meilisearch_python_sdk import AsyncClient
3387
3202
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3388
3203
  >>> index = client.index("movies")
@@ -3399,21 +3214,17 @@ class AsyncIndex(_BaseIndex):
3399
3214
  """Update distinct attribute of the index.
3400
3215
 
3401
3216
  Args:
3402
-
3403
3217
  body: Distinct attribute.
3404
3218
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3405
3219
 
3406
3220
  Returns:
3407
-
3408
3221
  The details of the task status.
3409
3222
 
3410
3223
  Raises:
3411
-
3412
3224
  MeilisearchCommunicationError: If there was an error communicating with the server.
3413
3225
  MeilisearchApiError: If the Meilisearch API returned an error.
3414
3226
 
3415
- Examples:
3416
-
3227
+ Examples
3417
3228
  >>> from meilisearch_python_sdk import AsyncClient
3418
3229
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3419
3230
  >>> index = client.index("movies")
@@ -3429,16 +3240,13 @@ class AsyncIndex(_BaseIndex):
3429
3240
  """Reset distinct attribute of the index to default values.
3430
3241
 
3431
3242
  Returns:
3432
-
3433
3243
  The details of the task status.
3434
3244
 
3435
3245
  Raises:
3436
-
3437
3246
  MeilisearchCommunicationError: If there was an error communicating with the server.
3438
3247
  MeilisearchApiError: If the Meilisearch API returned an error.
3439
3248
 
3440
- Examples:
3441
-
3249
+ Examples
3442
3250
  >>> from meilisearch_python_sdk import AsyncClient
3443
3251
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3444
3252
  >>> index = client.index("movies")
@@ -3452,16 +3260,13 @@ class AsyncIndex(_BaseIndex):
3452
3260
  """Get searchable attributes of the index.
3453
3261
 
3454
3262
  Returns:
3455
-
3456
3263
  List containing the searchable attributes of the index.
3457
3264
 
3458
3265
  Raises:
3459
-
3460
3266
  MeilisearchCommunicationError: If there was an error communicating with the server.
3461
3267
  MeilisearchApiError: If the Meilisearch API returned an error.
3462
3268
 
3463
- Examples:
3464
-
3269
+ Examples
3465
3270
  >>> from meilisearch_python_sdk import AsyncClient
3466
3271
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3467
3272
  >>> index = client.index("movies")
@@ -3477,21 +3282,17 @@ class AsyncIndex(_BaseIndex):
3477
3282
  """Update searchable attributes of the index.
3478
3283
 
3479
3284
  Args:
3480
-
3481
3285
  body: List containing the searchable attributes.
3482
3286
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3483
3287
 
3484
3288
  Returns:
3485
-
3486
3289
  The details of the task status.
3487
3290
 
3488
3291
  Raises:
3489
-
3490
3292
  MeilisearchCommunicationError: If there was an error communicating with the server.
3491
3293
  MeilisearchApiError: If the Meilisearch API returned an error.
3492
3294
 
3493
- Examples:
3494
-
3295
+ Examples
3495
3296
  >>> from meilisearch_python_sdk import AsyncClient
3496
3297
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3497
3298
  >>> index = client.index("movies")
@@ -3507,16 +3308,13 @@ class AsyncIndex(_BaseIndex):
3507
3308
  """Reset searchable attributes of the index to default values.
3508
3309
 
3509
3310
  Returns:
3510
-
3511
3311
  The details of the task status.
3512
3312
 
3513
3313
  Raises:
3514
-
3515
3314
  MeilisearchCommunicationError: If there was an error communicating with the server.
3516
3315
  MeilisearchApiError: If the Meilisearch API returned an error.
3517
3316
 
3518
- Examples:
3519
-
3317
+ Examples
3520
3318
  >>> from meilisearch_python_sdk import AsyncClient
3521
3319
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3522
3320
  >>> index = client.index("movies")
@@ -3530,16 +3328,13 @@ class AsyncIndex(_BaseIndex):
3530
3328
  """Get displayed attributes of the index.
3531
3329
 
3532
3330
  Returns:
3533
-
3534
3331
  List containing the displayed attributes of the index.
3535
3332
 
3536
3333
  Raises:
3537
-
3538
3334
  MeilisearchCommunicationError: If there was an error communicating with the server.
3539
3335
  MeilisearchApiError: If the Meilisearch API returned an error.
3540
3336
 
3541
- Examples:
3542
-
3337
+ Examples
3543
3338
  >>> from meilisearch_python_sdk import AsyncClient
3544
3339
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3545
3340
  >>> index = client.index("movies")
@@ -3555,21 +3350,17 @@ class AsyncIndex(_BaseIndex):
3555
3350
  """Update displayed attributes of the index.
3556
3351
 
3557
3352
  Args:
3558
-
3559
3353
  body: List containing the displayed attributes.
3560
3354
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3561
3355
 
3562
3356
  Returns:
3563
-
3564
3357
  The details of the task status.
3565
3358
 
3566
3359
  Raises:
3567
-
3568
3360
  MeilisearchCommunicationError: If there was an error communicating with the server.
3569
3361
  MeilisearchApiError: If the Meilisearch API returned an error.
3570
3362
 
3571
- Examples:
3572
-
3363
+ Examples
3573
3364
  >>> from meilisearch_python_sdk import AsyncClient
3574
3365
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3575
3366
  >>> index = client.index("movies")
@@ -3587,16 +3378,13 @@ class AsyncIndex(_BaseIndex):
3587
3378
  """Reset displayed attributes of the index to default values.
3588
3379
 
3589
3380
  Returns:
3590
-
3591
3381
  The details of the task status.
3592
3382
 
3593
3383
  Raises:
3594
-
3595
3384
  MeilisearchCommunicationError: If there was an error communicating with the server.
3596
3385
  MeilisearchApiError: If the Meilisearch API returned an error.
3597
3386
 
3598
- Examples:
3599
-
3387
+ Examples
3600
3388
  >>> from meilisearch_python_sdk import AsyncClient
3601
3389
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3602
3390
  >>> index = client.index("movies")
@@ -3610,16 +3398,13 @@ class AsyncIndex(_BaseIndex):
3610
3398
  """Get stop words of the index.
3611
3399
 
3612
3400
  Returns:
3613
-
3614
3401
  List containing the stop words of the index.
3615
3402
 
3616
3403
  Raises:
3617
-
3618
3404
  MeilisearchCommunicationError: If there was an error communicating with the server.
3619
3405
  MeilisearchApiError: If the Meilisearch API returned an error.
3620
3406
 
3621
- Examples:
3622
-
3407
+ Examples
3623
3408
  >>> from meilisearch_python_sdk import AsyncClient
3624
3409
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3625
3410
  >>> index = client.index("movies")
@@ -3636,21 +3421,17 @@ class AsyncIndex(_BaseIndex):
3636
3421
  """Update stop words of the index.
3637
3422
 
3638
3423
  Args:
3639
-
3640
3424
  body: List containing the stop words of the index.
3641
3425
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3642
3426
 
3643
3427
  Returns:
3644
-
3645
3428
  The details of the task status.
3646
3429
 
3647
3430
  Raises:
3648
-
3649
3431
  MeilisearchCommunicationError: If there was an error communicating with the server.
3650
3432
  MeilisearchApiError: If the Meilisearch API returned an error.
3651
3433
 
3652
- Examples:
3653
-
3434
+ Examples
3654
3435
  >>> from meilisearch_python_sdk import AsyncClient
3655
3436
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3656
3437
  >>> index = client.index("movies")
@@ -3666,16 +3447,13 @@ class AsyncIndex(_BaseIndex):
3666
3447
  """Reset stop words of the index to default values.
3667
3448
 
3668
3449
  Returns:
3669
-
3670
3450
  The details of the task status.
3671
3451
 
3672
3452
  Raises:
3673
-
3674
3453
  MeilisearchCommunicationError: If there was an error communicating with the server.
3675
3454
  MeilisearchApiError: If the Meilisearch API returned an error.
3676
3455
 
3677
- Examples:
3678
-
3456
+ Examples
3679
3457
  >>> from meilisearch_python_sdk import AsyncClient
3680
3458
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3681
3459
  >>> index = client.index("movies")
@@ -3689,16 +3467,13 @@ class AsyncIndex(_BaseIndex):
3689
3467
  """Get synonyms of the index.
3690
3468
 
3691
3469
  Returns:
3692
-
3693
3470
  The synonyms of the index.
3694
3471
 
3695
3472
  Raises:
3696
-
3697
3473
  MeilisearchCommunicationError: If there was an error communicating with the server.
3698
3474
  MeilisearchApiError: If the Meilisearch API returned an error.
3699
3475
 
3700
- Examples:
3701
-
3476
+ Examples
3702
3477
  >>> from meilisearch_python_sdk import AsyncClient
3703
3478
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3704
3479
  >>> index = client.index("movies")
@@ -3717,21 +3492,17 @@ class AsyncIndex(_BaseIndex):
3717
3492
  """Update synonyms of the index.
3718
3493
 
3719
3494
  Args:
3720
-
3721
3495
  body: The synonyms of the index.
3722
3496
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3723
3497
 
3724
3498
  Returns:
3725
-
3726
3499
  The details of the task status.
3727
3500
 
3728
3501
  Raises:
3729
-
3730
3502
  MeilisearchCommunicationError: If there was an error communicating with the server.
3731
3503
  MeilisearchApiError: If the Meilisearch API returned an error.
3732
3504
 
3733
- Examples:
3734
-
3505
+ Examples
3735
3506
  >>> from meilisearch_python_sdk import AsyncClient
3736
3507
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3737
3508
  >>> index = client.index("movies")
@@ -3749,16 +3520,13 @@ class AsyncIndex(_BaseIndex):
3749
3520
  """Reset synonyms of the index to default values.
3750
3521
 
3751
3522
  Returns:
3752
-
3753
3523
  The details of the task status.
3754
3524
 
3755
3525
  Raises:
3756
-
3757
3526
  MeilisearchCommunicationError: If there was an error communicating with the server.
3758
3527
  MeilisearchApiError: If the Meilisearch API returned an error.
3759
3528
 
3760
- Examples:
3761
-
3529
+ Examples
3762
3530
  >>> from meilisearch_python_sdk import AsyncClient
3763
3531
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3764
3532
  >>> index = client.index("movies")
@@ -3772,16 +3540,13 @@ class AsyncIndex(_BaseIndex):
3772
3540
  """Get filterable attributes of the index.
3773
3541
 
3774
3542
  Returns:
3775
-
3776
3543
  List containing the filterable attributes of the index.
3777
3544
 
3778
3545
  Raises:
3779
-
3780
3546
  MeilisearchCommunicationError: If there was an error communicating with the server.
3781
3547
  MeilisearchApiError: If the Meilisearch API returned an error.
3782
3548
 
3783
- Examples:
3784
-
3549
+ Examples
3785
3550
  >>> from meilisearch_python_sdk import AsyncClient
3786
3551
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3787
3552
  >>> index = client.index("movies")
@@ -3800,21 +3565,17 @@ class AsyncIndex(_BaseIndex):
3800
3565
  """Update filterable attributes of the index.
3801
3566
 
3802
3567
  Args:
3803
-
3804
3568
  body: List containing the filterable attributes of the index.
3805
3569
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3806
3570
 
3807
3571
  Returns:
3808
-
3809
3572
  The details of the task status.
3810
3573
 
3811
3574
  Raises:
3812
-
3813
3575
  MeilisearchCommunicationError: If there was an error communicating with the server.
3814
3576
  MeilisearchApiError: If the Meilisearch API returned an error.
3815
3577
 
3816
- Examples:
3817
-
3578
+ Examples
3818
3579
  >>> from meilisearch_python_sdk import AsyncClient
3819
3580
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3820
3581
  >>> index = client.index("movies")
@@ -3830,16 +3591,13 @@ class AsyncIndex(_BaseIndex):
3830
3591
  """Reset filterable attributes of the index to default values.
3831
3592
 
3832
3593
  Returns:
3833
-
3834
3594
  The details of the task status.
3835
3595
 
3836
3596
  Raises:
3837
-
3838
3597
  MeilisearchCommunicationError: If there was an error communicating with the server.
3839
3598
  MeilisearchApiError: If the Meilisearch API returned an error.
3840
3599
 
3841
- Examples:
3842
-
3600
+ Examples
3843
3601
  >>> from meilisearch_python_sdk import AsyncClient
3844
3602
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3845
3603
  >>> index = client.index("movies")
@@ -3853,16 +3611,13 @@ class AsyncIndex(_BaseIndex):
3853
3611
  """Get sortable attributes of the AsyncIndex.
3854
3612
 
3855
3613
  Returns:
3856
-
3857
3614
  List containing the sortable attributes of the AsyncIndex.
3858
3615
 
3859
3616
  Raises:
3860
-
3861
3617
  MeilisearchCommunicationError: If there was an error communicating with the server.
3862
3618
  MeilisearchApiError: If the Meilisearch API returned an error.
3863
3619
 
3864
- Examples:
3865
-
3620
+ Examples
3866
3621
  >>> from meilisearch_python_sdk import AsyncClient
3867
3622
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3868
3623
  >>> index = client.index("movies")
@@ -3878,21 +3633,17 @@ class AsyncIndex(_BaseIndex):
3878
3633
  """Get sortable attributes of the AsyncIndex.
3879
3634
 
3880
3635
  Args:
3881
-
3882
3636
  sortable_attributes: List of attributes for searching.
3883
3637
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3884
3638
 
3885
3639
  Returns:
3886
-
3887
3640
  The details of the task status.
3888
3641
 
3889
3642
  Raises:
3890
-
3891
3643
  MeilisearchCommunicationError: If there was an error communicating with the server.
3892
3644
  MeilisearchApiError: If the Meilisearch API returned an error.
3893
3645
 
3894
- Examples:
3895
-
3646
+ Examples
3896
3647
  >>> from meilisearch_python_sdk import AsyncClient
3897
3648
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3898
3649
  >>> index = client.index("movies")
@@ -3908,16 +3659,13 @@ class AsyncIndex(_BaseIndex):
3908
3659
  """Reset sortable attributes of the index to default values.
3909
3660
 
3910
3661
  Returns:
3911
-
3912
3662
  The details of the task status.
3913
3663
 
3914
3664
  Raises:
3915
-
3916
3665
  MeilisearchCommunicationError: If there was an error communicating with the server.
3917
3666
  MeilisearchApiError: If the Meilisearch API returned an error.
3918
3667
 
3919
- Examples:
3920
-
3668
+ Examples
3921
3669
  >>> from meilisearch_python_sdk import AsyncClient
3922
3670
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3923
3671
  >>> index = client.index("movies")
@@ -3931,16 +3679,13 @@ class AsyncIndex(_BaseIndex):
3931
3679
  """Get typo tolerance for the index.
3932
3680
 
3933
3681
  Returns:
3934
-
3935
3682
  TypoTolerance for the index.
3936
3683
 
3937
3684
  Raises:
3938
-
3939
3685
  MeilisearchCommunicationError: If there was an error communicating with the server.
3940
3686
  MeilisearchApiError: If the Meilisearch API returned an error.
3941
3687
 
3942
- Examples:
3943
-
3688
+ Examples
3944
3689
  >>> from meilisearch_python_sdk import AsyncClient
3945
3690
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3946
3691
  >>> index = client.index("movies")
@@ -3956,21 +3701,17 @@ class AsyncIndex(_BaseIndex):
3956
3701
  """Update typo tolerance.
3957
3702
 
3958
3703
  Args:
3959
-
3960
3704
  typo_tolerance: Typo tolerance settings.
3961
3705
  compress: If set to True the data will be sent in gzip format. Defaults to False.
3962
3706
 
3963
3707
  Returns:
3964
-
3965
3708
  Task to track the action.
3966
3709
 
3967
3710
  Raises:
3968
-
3969
3711
  MeilisearchCommunicationError: If there was an error communicating with the server.
3970
3712
  MeilisearchApiError: If the Meilisearch API returned an error.
3971
3713
 
3972
- Examples:
3973
-
3714
+ Examples
3974
3715
  >>> from meilisearch_python_sdk import AsyncClient
3975
3716
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
3976
3717
  >>> index = client.index("movies")
@@ -3989,16 +3730,13 @@ class AsyncIndex(_BaseIndex):
3989
3730
  """Reset typo tolerance to default values.
3990
3731
 
3991
3732
  Returns:
3992
-
3993
3733
  The details of the task status.
3994
3734
 
3995
3735
  Raises:
3996
-
3997
3736
  MeilisearchCommunicationError: If there was an error communicating with the server.
3998
3737
  MeilisearchApiError: If the Meilisearch API returned an error.
3999
3738
 
4000
- Examples:
4001
-
3739
+ Examples
4002
3740
  >>> from meilisearch_python_sdk import AsyncClient
4003
3741
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4004
3742
  >>> index = client.index("movies")
@@ -4012,16 +3750,13 @@ class AsyncIndex(_BaseIndex):
4012
3750
  """Get faceting for the index.
4013
3751
 
4014
3752
  Returns:
4015
-
4016
3753
  Faceting for the index.
4017
3754
 
4018
3755
  Raises:
4019
-
4020
3756
  MeilisearchCommunicationError: If there was an error communicating with the server.
4021
3757
  MeilisearchApiError: If the Meilisearch API returned an error.
4022
3758
 
4023
- Examples:
4024
-
3759
+ Examples
4025
3760
  >>> from meilisearch_python_sdk import AsyncClient
4026
3761
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4027
3762
  >>> index = client.index("movies")
@@ -4035,21 +3770,17 @@ class AsyncIndex(_BaseIndex):
4035
3770
  """Partially update the faceting settings for an index.
4036
3771
 
4037
3772
  Args:
4038
-
4039
3773
  faceting: Faceting values.
4040
3774
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4041
3775
 
4042
3776
  Returns:
4043
-
4044
3777
  Task to track the action.
4045
3778
 
4046
3779
  Raises:
4047
-
4048
3780
  MeilisearchCommunicationError: If there was an error communicating with the server.
4049
3781
  MeilisearchApiError: If the Meilisearch API returned an error.
4050
3782
 
4051
- Examples:
4052
-
3783
+ Examples
4053
3784
  >>> from meilisearch_python_sdk import AsyncClient
4054
3785
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4055
3786
  >>> index = client.index("movies")
@@ -4067,16 +3798,13 @@ class AsyncIndex(_BaseIndex):
4067
3798
  """Reset an index's faceting settings to their default value.
4068
3799
 
4069
3800
  Returns:
4070
-
4071
3801
  The details of the task status.
4072
3802
 
4073
3803
  Raises:
4074
-
4075
3804
  MeilisearchCommunicationError: If there was an error communicating with the server.
4076
3805
  MeilisearchApiError: If the Meilisearch API returned an error.
4077
3806
 
4078
- Examples:
4079
-
3807
+ Examples
4080
3808
  >>> from meilisearch_python_sdk import AsyncClient
4081
3809
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4082
3810
  >>> index = client.index("movies")
@@ -4090,16 +3818,13 @@ class AsyncIndex(_BaseIndex):
4090
3818
  """Get pagination settings for the index.
4091
3819
 
4092
3820
  Returns:
4093
-
4094
3821
  Pagination for the index.
4095
3822
 
4096
3823
  Raises:
4097
-
4098
3824
  MeilisearchCommunicationError: If there was an error communicating with the server.
4099
3825
  MeilisearchApiError: If the Meilisearch API returned an error.
4100
3826
 
4101
- Examples:
4102
-
3827
+ Examples
4103
3828
  >>> from meilisearch_async_client import AsyncClient
4104
3829
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4105
3830
  >>> index = client.index("movies")
@@ -4113,21 +3838,17 @@ class AsyncIndex(_BaseIndex):
4113
3838
  """Partially update the pagination settings for an index.
4114
3839
 
4115
3840
  Args:
4116
-
4117
3841
  settings: settings for pagination.
4118
3842
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4119
3843
 
4120
3844
  Returns:
4121
-
4122
3845
  Task to track the action.
4123
3846
 
4124
3847
  Raises:
4125
-
4126
3848
  MeilisearchCommunicationError: If there was an error communicating with the server.
4127
3849
  MeilisearchApiError: If the Meilisearch API returned an error.
4128
3850
 
4129
- Examples:
4130
-
3851
+ Examples
4131
3852
  >>> from meilisearch_python_sdk import AsyncClient
4132
3853
  >>> from meilisearch_python_sdk.models.settings import Pagination
4133
3854
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
@@ -4146,16 +3867,13 @@ class AsyncIndex(_BaseIndex):
4146
3867
  """Reset an index's pagination settings to their default value.
4147
3868
 
4148
3869
  Returns:
4149
-
4150
3870
  The details of the task status.
4151
3871
 
4152
3872
  Raises:
4153
-
4154
3873
  MeilisearchCommunicationError: If there was an error communicating with the server.
4155
3874
  MeilisearchApiError: If the Meilisearch API returned an error.
4156
3875
 
4157
- Examples:
4158
-
3876
+ Examples
4159
3877
  >>> from meilisearch_async_client import AsyncClient
4160
3878
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4161
3879
  >>> index = client.index("movies")
@@ -4169,16 +3887,13 @@ class AsyncIndex(_BaseIndex):
4169
3887
  """Get separator token settings for the index.
4170
3888
 
4171
3889
  Returns:
4172
-
4173
3890
  Separator tokens for the index.
4174
3891
 
4175
3892
  Raises:
4176
-
4177
3893
  MeilisearchCommunicationError: If there was an error communicating with the server.
4178
3894
  MeilisearchApiError: If the Meilisearch API returned an error.
4179
3895
 
4180
- Examples:
4181
-
3896
+ Examples
4182
3897
  >>> from meilisearch_async_client import AsyncClient
4183
3898
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4184
3899
  >>> index = client.index("movies")
@@ -4194,21 +3909,17 @@ class AsyncIndex(_BaseIndex):
4194
3909
  """Update the separator tokens settings for an index.
4195
3910
 
4196
3911
  Args:
4197
-
4198
3912
  separator_tokens: List of separator tokens.
4199
3913
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4200
3914
 
4201
3915
  Returns:
4202
-
4203
3916
  Task to track the action.
4204
3917
 
4205
3918
  Raises:
4206
-
4207
3919
  MeilisearchCommunicationError: If there was an error communicating with the server.
4208
3920
  MeilisearchApiError: If the Meilisearch API returned an error.
4209
3921
 
4210
- Examples:
4211
-
3922
+ Examples
4212
3923
  >>> from meilisearch_python_sdk import AsyncClient
4213
3924
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4214
3925
  >>> index = client.index("movies")
@@ -4224,16 +3935,13 @@ class AsyncIndex(_BaseIndex):
4224
3935
  """Reset an index's separator tokens settings to the default value.
4225
3936
 
4226
3937
  Returns:
4227
-
4228
3938
  The details of the task status.
4229
3939
 
4230
3940
  Raises:
4231
-
4232
3941
  MeilisearchCommunicationError: If there was an error communicating with the server.
4233
3942
  MeilisearchApiError: If the Meilisearch API returned an error.
4234
3943
 
4235
- Examples:
4236
-
3944
+ Examples
4237
3945
  >>> from meilisearch_async_client import AsyncClient
4238
3946
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4239
3947
  >>> index = client.index("movies")
@@ -4247,16 +3955,13 @@ class AsyncIndex(_BaseIndex):
4247
3955
  """Get non-separator token settings for the index.
4248
3956
 
4249
3957
  Returns:
4250
-
4251
3958
  Non-separator tokens for the index.
4252
3959
 
4253
3960
  Raises:
4254
-
4255
3961
  MeilisearchCommunicationError: If there was an error communicating with the server.
4256
3962
  MeilisearchApiError: If the Meilisearch API returned an error.
4257
3963
 
4258
- Examples:
4259
-
3964
+ Examples
4260
3965
  >>> from meilisearch_async_client import AsyncClient
4261
3966
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4262
3967
  >>> index = client.index("movies")
@@ -4272,21 +3977,17 @@ class AsyncIndex(_BaseIndex):
4272
3977
  """Update the non-separator tokens settings for an index.
4273
3978
 
4274
3979
  Args:
4275
-
4276
3980
  non_separator_tokens: List of non-separator tokens.
4277
3981
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4278
3982
 
4279
3983
  Returns:
4280
-
4281
3984
  Task to track the action.
4282
3985
 
4283
3986
  Raises:
4284
-
4285
3987
  MeilisearchCommunicationError: If there was an error communicating with the server.
4286
3988
  MeilisearchApiError: If the Meilisearch API returned an error.
4287
3989
 
4288
- Examples:
4289
-
3990
+ Examples
4290
3991
  >>> from meilisearch_python_sdk import AsyncClient
4291
3992
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4292
3993
  >>> index = client.index("movies")
@@ -4302,16 +4003,13 @@ class AsyncIndex(_BaseIndex):
4302
4003
  """Reset an index's non-separator tokens settings to the default value.
4303
4004
 
4304
4005
  Returns:
4305
-
4306
4006
  The details of the task status.
4307
4007
 
4308
4008
  Raises:
4309
-
4310
4009
  MeilisearchCommunicationError: If there was an error communicating with the server.
4311
4010
  MeilisearchApiError: If the Meilisearch API returned an error.
4312
4011
 
4313
- Examples:
4314
-
4012
+ Examples
4315
4013
  >>> from meilisearch_async_client import AsyncClient
4316
4014
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4317
4015
  >>> index = client.index("movies")
@@ -4325,16 +4023,13 @@ class AsyncIndex(_BaseIndex):
4325
4023
  """Get search cutoff time in ms.
4326
4024
 
4327
4025
  Returns:
4328
-
4329
4026
  Integer representing the search cutoff time in ms, or None.
4330
4027
 
4331
4028
  Raises:
4332
-
4333
4029
  MeilisearchCommunicationError: If there was an error communicating with the server.
4334
4030
  MeilisearchApiError: If the Meilisearch API returned an error.
4335
4031
 
4336
- Examples:
4337
-
4032
+ Examples
4338
4033
  >>> from meilisearch_async_client import AsyncClient
4339
4034
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4340
4035
  >>> index = client.index("movies")
@@ -4350,21 +4045,17 @@ class AsyncIndex(_BaseIndex):
4350
4045
  """Update the search cutoff for an index.
4351
4046
 
4352
4047
  Args:
4353
-
4354
4048
  search_cutoff_ms: Integer value of the search cutoff time in ms.
4355
4049
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4356
4050
 
4357
4051
  Returns:
4358
-
4359
4052
  The details of the task status.
4360
4053
 
4361
4054
  Raises:
4362
-
4363
4055
  MeilisearchCommunicationError: If there was an error communicating with the server.
4364
4056
  MeilisearchApiError: If the Meilisearch API returned an error.
4365
4057
 
4366
- Examples:
4367
-
4058
+ Examples
4368
4059
  >>> from meilisearch_python_sdk import AsyncClient
4369
4060
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4370
4061
  >>> index = client.index("movies")
@@ -4380,16 +4071,13 @@ class AsyncIndex(_BaseIndex):
4380
4071
  """Reset the search cutoff time to the default value.
4381
4072
 
4382
4073
  Returns:
4383
-
4384
4074
  The details of the task status.
4385
4075
 
4386
4076
  Raises:
4387
-
4388
4077
  MeilisearchCommunicationError: If there was an error communicating with the server.
4389
4078
  MeilisearchApiError: If the Meilisearch API returned an error.
4390
4079
 
4391
- Examples:
4392
-
4080
+ Examples
4393
4081
  >>> from meilisearch_async_client import AsyncClient
4394
4082
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4395
4083
  >>> index = client.index("movies")
@@ -4403,16 +4091,13 @@ class AsyncIndex(_BaseIndex):
4403
4091
  """Get word dictionary settings for the index.
4404
4092
 
4405
4093
  Returns:
4406
-
4407
4094
  Word dictionary for the index.
4408
4095
 
4409
4096
  Raises:
4410
-
4411
4097
  MeilisearchCommunicationError: If there was an error communicating with the server.
4412
4098
  MeilisearchApiError: If the Meilisearch API returned an error.
4413
4099
 
4414
- Examples:
4415
-
4100
+ Examples
4416
4101
  >>> from meilisearch_async_client import AsyncClient
4417
4102
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4418
4103
  >>> index = client.index("movies")
@@ -4428,21 +4113,17 @@ class AsyncIndex(_BaseIndex):
4428
4113
  """Update the word dictionary settings for an index.
4429
4114
 
4430
4115
  Args:
4431
-
4432
4116
  dictionary: List of dictionary values.
4433
4117
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4434
4118
 
4435
4119
  Returns:
4436
-
4437
4120
  Task to track the action.
4438
4121
 
4439
4122
  Raises:
4440
-
4441
4123
  MeilisearchCommunicationError: If there was an error communicating with the server.
4442
4124
  MeilisearchApiError: If the Meilisearch API returned an error.
4443
4125
 
4444
- Examples:
4445
-
4126
+ Examples
4446
4127
  >>> from meilisearch_python_sdk import AsyncClient
4447
4128
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4448
4129
  >>> index = client.index("movies")
@@ -4458,16 +4139,13 @@ class AsyncIndex(_BaseIndex):
4458
4139
  """Reset an index's word dictionary settings to the default value.
4459
4140
 
4460
4141
  Returns:
4461
-
4462
4142
  The details of the task status.
4463
4143
 
4464
4144
  Raises:
4465
-
4466
4145
  MeilisearchCommunicationError: If there was an error communicating with the server.
4467
4146
  MeilisearchApiError: If the Meilisearch API returned an error.
4468
4147
 
4469
- Examples:
4470
-
4148
+ Examples
4471
4149
  >>> from meilisearch_async_client import AsyncClient
4472
4150
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4473
4151
  >>> index = client.index("movies")
@@ -4481,16 +4159,13 @@ class AsyncIndex(_BaseIndex):
4481
4159
  """Get proximity precision settings for the index.
4482
4160
 
4483
4161
  Returns:
4484
-
4485
4162
  Proximity precision for the index.
4486
4163
 
4487
4164
  Raises:
4488
-
4489
4165
  MeilisearchCommunicationError: If there was an error communicating with the server.
4490
4166
  MeilisearchApiError: If the Meilisearch API returned an error.
4491
4167
 
4492
- Examples:
4493
-
4168
+ Examples
4494
4169
  >>> from meilisearch_async_client import AsyncClient
4495
4170
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4496
4171
  >>> index = client.index("movies")
@@ -4506,21 +4181,17 @@ class AsyncIndex(_BaseIndex):
4506
4181
  """Update the proximity precision settings for an index.
4507
4182
 
4508
4183
  Args:
4509
-
4510
4184
  proximity_precision: The proximity precision value.
4511
4185
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4512
4186
 
4513
4187
  Returns:
4514
-
4515
4188
  Task to track the action.
4516
4189
 
4517
4190
  Raises:
4518
-
4519
4191
  MeilisearchCommunicationError: If there was an error communicating with the server.
4520
4192
  MeilisearchApiError: If the Meilisearch API returned an error.
4521
4193
 
4522
- Examples:
4523
-
4194
+ Examples
4524
4195
  >>> from meilisearch_python_sdk import AsyncClient
4525
4196
  >>> from meilisearch_python_sdk.models.settings import ProximityPrecision
4526
4197
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
@@ -4539,16 +4210,13 @@ class AsyncIndex(_BaseIndex):
4539
4210
  """Reset an index's proximity precision settings to the default value.
4540
4211
 
4541
4212
  Returns:
4542
-
4543
4213
  The details of the task status.
4544
4214
 
4545
4215
  Raises:
4546
-
4547
4216
  MeilisearchCommunicationError: If there was an error communicating with the server.
4548
4217
  MeilisearchApiError: If the Meilisearch API returned an error.
4549
4218
 
4550
- Examples:
4551
-
4219
+ Examples
4552
4220
  >>> from meilisearch_async_client import AsyncClient
4553
4221
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4554
4222
  >>> index = client.index("movies")
@@ -4562,16 +4230,13 @@ class AsyncIndex(_BaseIndex):
4562
4230
  """Get embedder settings for the index.
4563
4231
 
4564
4232
  Returns:
4565
-
4566
4233
  Embedders for the index.
4567
4234
 
4568
4235
  Raises:
4569
-
4570
4236
  MeilisearchCommunicationError: If there was an error communicating with the server.
4571
4237
  MeilisearchApiError: If the Meilisearch API returned an error.
4572
4238
 
4573
- Examples:
4574
-
4239
+ Examples
4575
4240
  >>> from meilisearch_async_client import AsyncClient
4576
4241
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4577
4242
  >>> index = client.index("movies")
@@ -4585,21 +4250,17 @@ class AsyncIndex(_BaseIndex):
4585
4250
  """Update the embedders settings for an index.
4586
4251
 
4587
4252
  Args:
4588
-
4589
4253
  embedders: The embedders value.
4590
4254
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4591
4255
 
4592
4256
  Returns:
4593
-
4594
4257
  Task to track the action.
4595
4258
 
4596
4259
  Raises:
4597
-
4598
4260
  MeilisearchCommunicationError: If there was an error communicating with the server.
4599
4261
  MeilisearchApiError: If the Meilisearch API returned an error.
4600
4262
 
4601
- Examples:
4602
-
4263
+ Examples
4603
4264
  >>> from meilisearch_python_sdk import AsyncClient
4604
4265
  >>> from meilisearch_python_sdk.models.settings import Embedders, UserProvidedEmbedder
4605
4266
  >>>
@@ -4613,7 +4274,9 @@ class AsyncIndex(_BaseIndex):
4613
4274
  payload = {}
4614
4275
  for key, embedder in embedders.embedders.items():
4615
4276
  payload[key] = {
4616
- k: v for k, v in embedder.model_dump(by_alias=True).items() if v is not None
4277
+ k: v
4278
+ for k, v in embedder.model_dump(by_alias=True, exclude_none=True).items()
4279
+ if v is not None
4617
4280
  }
4618
4281
 
4619
4282
  response = await self._http_requests.patch(
@@ -4626,16 +4289,13 @@ class AsyncIndex(_BaseIndex):
4626
4289
  """Reset an index's embedders settings to the default value.
4627
4290
 
4628
4291
  Returns:
4629
-
4630
4292
  The details of the task status.
4631
4293
 
4632
4294
  Raises:
4633
-
4634
4295
  MeilisearchCommunicationError: If there was an error communicating with the server.
4635
4296
  MeilisearchApiError: If the Meilisearch API returned an error.
4636
4297
 
4637
- Examples:
4638
-
4298
+ Examples
4639
4299
  >>> from meilisearch_async_client import AsyncClient
4640
4300
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4641
4301
  >>> index = client.index("movies")
@@ -4649,16 +4309,13 @@ class AsyncIndex(_BaseIndex):
4649
4309
  """Get localized attributes settings for the index.
4650
4310
 
4651
4311
  Returns:
4652
-
4653
4312
  Localized attributes for the index.
4654
4313
 
4655
4314
  Raises:
4656
-
4657
4315
  MeilisearchCommunicationError: If there was an error communicating with the server.
4658
4316
  MeilisearchApiError: If the Meilisearch API returned an error.
4659
4317
 
4660
- Examples:
4661
-
4318
+ Examples
4662
4319
  >>> from meilisearch_async_client import AsyncClient
4663
4320
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4664
4321
  >>> index = client.index("movies")
@@ -4677,21 +4334,17 @@ class AsyncIndex(_BaseIndex):
4677
4334
  """Update the localized attributes settings for an index.
4678
4335
 
4679
4336
  Args:
4680
-
4681
4337
  localized_attributes: The localized attributes value.
4682
4338
  compress: If set to True the data will be sent in gzip format. Defaults to False.
4683
4339
 
4684
4340
  Returns:
4685
-
4686
4341
  Task to track the action.
4687
4342
 
4688
4343
  Raises:
4689
-
4690
4344
  MeilisearchCommunicationError: If there was an error communicating with the server.
4691
4345
  MeilisearchApiError: If the Meilisearch API returned an error.
4692
4346
 
4693
- Examples:
4694
-
4347
+ Examples
4695
4348
  >>> from meilisearch_python_sdk import AsyncClient
4696
4349
  >>> from meilisearch_python_sdk.models.settings import LocalizedAttributes
4697
4350
  >>>
@@ -4714,16 +4367,13 @@ class AsyncIndex(_BaseIndex):
4714
4367
  """Reset an index's localized attributes settings to the default value.
4715
4368
 
4716
4369
  Returns:
4717
-
4718
4370
  The details of the task status.
4719
4371
 
4720
4372
  Raises:
4721
-
4722
4373
  MeilisearchCommunicationError: If there was an error communicating with the server.
4723
4374
  MeilisearchApiError: If the Meilisearch API returned an error.
4724
4375
 
4725
- Examples:
4726
-
4376
+ Examples
4727
4377
  >>> from meilisearch_async_client import AsyncClient
4728
4378
  >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
4729
4379
  >>> index = client.index("movies")
@@ -4823,7 +4473,6 @@ class Index(_BaseIndex):
4823
4473
  """Class initializer.
4824
4474
 
4825
4475
  Args:
4826
-
4827
4476
  http_client: An instance of the Client. This automatically gets passed by the
4828
4477
  Client when creating and Index instance.
4829
4478
  uid: The index's unique identifier.
@@ -4855,10 +4504,7 @@ class Index(_BaseIndex):
4855
4504
  if not self.plugins or not self.plugins.add_documents_plugins:
4856
4505
  return None
4857
4506
 
4858
- plugins = []
4859
- for plugin in self.plugins.add_documents_plugins:
4860
- if plugin.POST_EVENT:
4861
- plugins.append(plugin)
4507
+ plugins = [plugin for plugin in self.plugins.add_documents_plugins if plugin.POST_EVENT]
4862
4508
 
4863
4509
  if not plugins:
4864
4510
  return None
@@ -4870,10 +4516,7 @@ class Index(_BaseIndex):
4870
4516
  if not self.plugins or not self.plugins.add_documents_plugins:
4871
4517
  return None
4872
4518
 
4873
- plugins = []
4874
- for plugin in self.plugins.add_documents_plugins:
4875
- if plugin.PRE_EVENT:
4876
- plugins.append(plugin)
4519
+ plugins = [plugin for plugin in self.plugins.add_documents_plugins if plugin.PRE_EVENT]
4877
4520
 
4878
4521
  if not plugins:
4879
4522
  return None
@@ -4885,10 +4528,9 @@ class Index(_BaseIndex):
4885
4528
  if not self.plugins or not self.plugins.delete_all_documents_plugins:
4886
4529
  return None
4887
4530
 
4888
- plugins = []
4889
- for plugin in self.plugins.delete_all_documents_plugins:
4890
- if plugin.POST_EVENT:
4891
- plugins.append(plugin)
4531
+ plugins = [
4532
+ plugin for plugin in self.plugins.delete_all_documents_plugins if plugin.POST_EVENT
4533
+ ]
4892
4534
 
4893
4535
  if not plugins:
4894
4536
  return None
@@ -4900,10 +4542,9 @@ class Index(_BaseIndex):
4900
4542
  if not self.plugins or not self.plugins.delete_all_documents_plugins:
4901
4543
  return None
4902
4544
 
4903
- plugins = []
4904
- for plugin in self.plugins.delete_all_documents_plugins:
4905
- if plugin.PRE_EVENT:
4906
- plugins.append(plugin)
4545
+ plugins = [
4546
+ plugin for plugin in self.plugins.delete_all_documents_plugins if plugin.PRE_EVENT
4547
+ ]
4907
4548
 
4908
4549
  if not plugins:
4909
4550
  return None
@@ -4915,10 +4556,7 @@ class Index(_BaseIndex):
4915
4556
  if not self.plugins or not self.plugins.delete_document_plugins:
4916
4557
  return None
4917
4558
 
4918
- plugins = []
4919
- for plugin in self.plugins.delete_document_plugins:
4920
- if plugin.POST_EVENT:
4921
- plugins.append(plugin)
4559
+ plugins = [plugin for plugin in self.plugins.delete_document_plugins if plugin.POST_EVENT]
4922
4560
 
4923
4561
  if not plugins:
4924
4562
  return None
@@ -4930,10 +4568,7 @@ class Index(_BaseIndex):
4930
4568
  if not self.plugins or not self.plugins.delete_document_plugins:
4931
4569
  return None
4932
4570
 
4933
- plugins = []
4934
- for plugin in self.plugins.delete_document_plugins:
4935
- if plugin.PRE_EVENT:
4936
- plugins.append(plugin)
4571
+ plugins = [plugin for plugin in self.plugins.delete_document_plugins if plugin.PRE_EVENT]
4937
4572
 
4938
4573
  if not plugins:
4939
4574
  return None
@@ -4945,10 +4580,7 @@ class Index(_BaseIndex):
4945
4580
  if not self.plugins or not self.plugins.delete_documents_plugins:
4946
4581
  return None
4947
4582
 
4948
- plugins = []
4949
- for plugin in self.plugins.delete_documents_plugins:
4950
- if plugin.POST_EVENT:
4951
- plugins.append(plugin)
4583
+ plugins = [plugin for plugin in self.plugins.delete_documents_plugins if plugin.POST_EVENT]
4952
4584
 
4953
4585
  if not plugins:
4954
4586
  return None
@@ -4960,10 +4592,7 @@ class Index(_BaseIndex):
4960
4592
  if not self.plugins or not self.plugins.delete_documents_plugins:
4961
4593
  return None
4962
4594
 
4963
- plugins = []
4964
- for plugin in self.plugins.delete_documents_plugins:
4965
- if plugin.PRE_EVENT:
4966
- plugins.append(plugin)
4595
+ plugins = [plugin for plugin in self.plugins.delete_documents_plugins if plugin.PRE_EVENT]
4967
4596
 
4968
4597
  if not plugins:
4969
4598
  return None
@@ -4975,10 +4604,11 @@ class Index(_BaseIndex):
4975
4604
  if not self.plugins or not self.plugins.delete_documents_by_filter_plugins:
4976
4605
  return None
4977
4606
 
4978
- plugins = []
4979
- for plugin in self.plugins.delete_documents_by_filter_plugins:
4980
- if plugin.POST_EVENT:
4981
- plugins.append(plugin)
4607
+ plugins = [
4608
+ plugin
4609
+ for plugin in self.plugins.delete_documents_by_filter_plugins
4610
+ if plugin.POST_EVENT
4611
+ ]
4982
4612
 
4983
4613
  if not plugins:
4984
4614
  return None
@@ -4990,10 +4620,9 @@ class Index(_BaseIndex):
4990
4620
  if not self.plugins or not self.plugins.delete_documents_by_filter_plugins:
4991
4621
  return None
4992
4622
 
4993
- plugins = []
4994
- for plugin in self.plugins.delete_documents_by_filter_plugins:
4995
- if plugin.PRE_EVENT:
4996
- plugins.append(plugin)
4623
+ plugins = [
4624
+ plugin for plugin in self.plugins.delete_documents_by_filter_plugins if plugin.PRE_EVENT
4625
+ ]
4997
4626
 
4998
4627
  if not plugins:
4999
4628
  return None
@@ -5005,10 +4634,7 @@ class Index(_BaseIndex):
5005
4634
  if not self.plugins or not self.plugins.facet_search_plugins:
5006
4635
  return None
5007
4636
 
5008
- plugins = []
5009
- for plugin in self.plugins.facet_search_plugins:
5010
- if plugin.POST_EVENT:
5011
- plugins.append(plugin)
4637
+ plugins = [plugin for plugin in self.plugins.facet_search_plugins if plugin.POST_EVENT]
5012
4638
 
5013
4639
  if not plugins:
5014
4640
  return None
@@ -5020,10 +4646,7 @@ class Index(_BaseIndex):
5020
4646
  if not self.plugins or not self.plugins.facet_search_plugins:
5021
4647
  return None
5022
4648
 
5023
- plugins = []
5024
- for plugin in self.plugins.facet_search_plugins:
5025
- if plugin.PRE_EVENT:
5026
- plugins.append(plugin)
4649
+ plugins = [plugin for plugin in self.plugins.facet_search_plugins if plugin.PRE_EVENT]
5027
4650
 
5028
4651
  if not plugins:
5029
4652
  return None
@@ -5035,10 +4658,7 @@ class Index(_BaseIndex):
5035
4658
  if not self.plugins or not self.plugins.search_plugins:
5036
4659
  return None
5037
4660
 
5038
- plugins = []
5039
- for plugin in self.plugins.search_plugins:
5040
- if plugin.POST_EVENT:
5041
- plugins.append(plugin)
4661
+ plugins = [plugin for plugin in self.plugins.search_plugins if plugin.POST_EVENT]
5042
4662
 
5043
4663
  if not plugins:
5044
4664
  return None
@@ -5050,10 +4670,7 @@ class Index(_BaseIndex):
5050
4670
  if not self.plugins or not self.plugins.search_plugins:
5051
4671
  return None
5052
4672
 
5053
- plugins = []
5054
- for plugin in self.plugins.search_plugins:
5055
- if plugin.PRE_EVENT:
5056
- plugins.append(plugin)
4673
+ plugins = [plugin for plugin in self.plugins.search_plugins if plugin.PRE_EVENT]
5057
4674
 
5058
4675
  if not plugins:
5059
4676
  return None
@@ -5065,10 +4682,7 @@ class Index(_BaseIndex):
5065
4682
  if not self.plugins or not self.plugins.update_documents_plugins:
5066
4683
  return None
5067
4684
 
5068
- plugins = []
5069
- for plugin in self.plugins.update_documents_plugins:
5070
- if plugin.POST_EVENT:
5071
- plugins.append(plugin)
4685
+ plugins = [plugin for plugin in self.plugins.update_documents_plugins if plugin.POST_EVENT]
5072
4686
 
5073
4687
  if not plugins:
5074
4688
  return None
@@ -5080,10 +4694,7 @@ class Index(_BaseIndex):
5080
4694
  if not self.plugins or not self.plugins.update_documents_plugins:
5081
4695
  return None
5082
4696
 
5083
- plugins = []
5084
- for plugin in self.plugins.update_documents_plugins:
5085
- if plugin.PRE_EVENT:
5086
- plugins.append(plugin)
4697
+ plugins = [plugin for plugin in self.plugins.update_documents_plugins if plugin.PRE_EVENT]
5087
4698
 
5088
4699
  if not plugins:
5089
4700
  return None
@@ -5094,16 +4705,13 @@ class Index(_BaseIndex):
5094
4705
  """Deletes the index.
5095
4706
 
5096
4707
  Returns:
5097
-
5098
4708
  The details of the task.
5099
4709
 
5100
4710
  Raises:
5101
-
5102
4711
  MeilisearchCommunicationError: If there was an error communicating with the server.
5103
4712
  MeilisearchApiError: If the Meilisearch API returned an error.
5104
4713
 
5105
- Examples:
5106
-
4714
+ Examples
5107
4715
  >>> from meilisearch_python_sdk import Client
5108
4716
  >>> client = Client("http://localhost.com", "masterKey")
5109
4717
  >>> index = client.index("movies")
@@ -5116,16 +4724,13 @@ class Index(_BaseIndex):
5116
4724
  """Delete the index if it already exists.
5117
4725
 
5118
4726
  Returns:
5119
-
5120
4727
  True if the index was deleted or False if not.
5121
4728
 
5122
4729
  Raises:
5123
-
5124
4730
  MeilisearchCommunicationError: If there was an error communicating with the server.
5125
4731
  MeilisearchApiError: If the Meilisearch API returned an error.
5126
4732
 
5127
- Examples:
5128
-
4733
+ Examples
5129
4734
  >>> from meilisearch_python_sdk import Client
5130
4735
  >>> client = Client("http://localhost.com", "masterKey")
5131
4736
  >>> index = client.index("movies")
@@ -5142,20 +4747,16 @@ class Index(_BaseIndex):
5142
4747
  """Update the index primary key.
5143
4748
 
5144
4749
  Args:
5145
-
5146
4750
  primary_key: The primary key of the documents.
5147
4751
 
5148
4752
  Returns:
5149
-
5150
4753
  An instance of the AsyncIndex with the updated information.
5151
4754
 
5152
4755
  Raises:
5153
-
5154
4756
  MeilisearchCommunicationError: If there was an error communicating with the server.
5155
4757
  MeilisearchApiError: If the Meilisearch API returned an error.
5156
4758
 
5157
- Examples:
5158
-
4759
+ Examples
5159
4760
  >>> from meilisearch_python_sdk import Client
5160
4761
  >>> client = Client("http://localhost.com", "masterKey")
5161
4762
  >>> index = client.index("movies")
@@ -5172,16 +4773,13 @@ class Index(_BaseIndex):
5172
4773
  """Gets the infromation about the index.
5173
4774
 
5174
4775
  Returns:
5175
-
5176
4776
  An instance of the AsyncIndex containing the retrieved information.
5177
4777
 
5178
4778
  Raises:
5179
-
5180
4779
  MeilisearchCommunicationError: If there was an error communicating with the server.
5181
4780
  MeilisearchApiError: If the Meilisearch API returned an error.
5182
4781
 
5183
- Examples:
5184
-
4782
+ Examples
5185
4783
  >>> from meilisearch_python_sdk import Client
5186
4784
  >>> client = Client("http://localhost.com", "masterKey")
5187
4785
  >>> index = client.index("movies")
@@ -5198,16 +4796,13 @@ class Index(_BaseIndex):
5198
4796
  """Get the primary key.
5199
4797
 
5200
4798
  Returns:
5201
-
5202
4799
  The primary key for the documents in the index.
5203
4800
 
5204
4801
  Raises:
5205
-
5206
4802
  MeilisearchCommunicationError: If there was an error communicating with the server.
5207
4803
  MeilisearchApiError: If the Meilisearch API returned an error.
5208
4804
 
5209
- Examples:
5210
-
4805
+ Examples
5211
4806
  >>> from meilisearch_python_sdk import Client
5212
4807
  >>> client = Client("http://localhost.com", "masterKey")
5213
4808
  >>> index = client.index("movies")
@@ -5236,7 +4831,6 @@ class Index(_BaseIndex):
5236
4831
  through the `Client`.
5237
4832
 
5238
4833
  Args:
5239
-
5240
4834
  http_client: An instance of the Client. This automatically gets passed by the Client
5241
4835
  when creating an Index instance.
5242
4836
  uid: The index's unique identifier.
@@ -5261,16 +4855,13 @@ class Index(_BaseIndex):
5261
4855
  JsonDict
5262
4856
 
5263
4857
  Returns:
5264
-
5265
4858
  An instance of Index containing the information of the newly created index.
5266
4859
 
5267
4860
  Raises:
5268
-
5269
4861
  MeilisearchCommunicationError: If there was an error communicating with the server.
5270
4862
  MeilisearchApiError: If the Meilisearch API returned an error.
5271
4863
 
5272
- Examples:
5273
-
4864
+ Examples
5274
4865
  >>> from meilisearch_python_sdk import Client
5275
4866
  >>> client = Client("http://localhost.com", "masterKey")
5276
4867
  >>> index = index.create(client, "movies")
@@ -5309,16 +4900,13 @@ class Index(_BaseIndex):
5309
4900
  """Get stats of the index.
5310
4901
 
5311
4902
  Returns:
5312
-
5313
4903
  Stats of the index.
5314
4904
 
5315
4905
  Raises:
5316
-
5317
4906
  MeilisearchCommunicationError: If there was an error communicating with the server.
5318
4907
  MeilisearchApiError: If the Meilisearch API returned an error.
5319
4908
 
5320
- Examples:
5321
-
4909
+ Examples
5322
4910
  >>> from meilisearch_python_sdk import Client
5323
4911
  >>> client = Client("http://localhost.com", "masterKey")
5324
4912
  >>> index = client.index("movies")
@@ -5360,7 +4948,6 @@ class Index(_BaseIndex):
5360
4948
  """Search the index.
5361
4949
 
5362
4950
  Args:
5363
-
5364
4951
  query: String containing the word(s) to search
5365
4952
  offset: Number of documents to skip. Defaults to 0.
5366
4953
  limit: Maximum number of documents returned. Defaults to 20.
@@ -5419,16 +5006,13 @@ class Index(_BaseIndex):
5419
5006
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
5420
5007
 
5421
5008
  Returns:
5422
-
5423
5009
  Results of the search
5424
5010
 
5425
5011
  Raises:
5426
-
5427
5012
  MeilisearchCommunicationError: If there was an error communicating with the server.
5428
5013
  MeilisearchApiError: If the Meilisearch API returned an error.
5429
5014
 
5430
- Examples:
5431
-
5015
+ Examples
5432
5016
  >>> from meilisearch_python_sdk import Client
5433
5017
  >>> client = Client("http://localhost.com", "masterKey")
5434
5018
  >>> index = client.index("movies")
@@ -5535,7 +5119,6 @@ class Index(_BaseIndex):
5535
5119
  """Search the index.
5536
5120
 
5537
5121
  Args:
5538
-
5539
5122
  query: String containing the word(s) to search
5540
5123
  facet_name: The name of the facet to search
5541
5124
  facet_query: The facet search value
@@ -5586,16 +5169,13 @@ class Index(_BaseIndex):
5586
5169
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
5587
5170
 
5588
5171
  Returns:
5589
-
5590
5172
  Results of the search
5591
5173
 
5592
5174
  Raises:
5593
-
5594
5175
  MeilisearchCommunicationError: If there was an error communicating with the server.
5595
5176
  MeilisearchApiError: If the Meilisearch API returned an error.
5596
5177
 
5597
- Examples:
5598
-
5178
+ Examples
5599
5179
  >>> from meilisearch_python_sdk import Client
5600
5180
  >>> client = Client("http://localhost.com", "masterKey")
5601
5181
  >>> index = client.index("movies")
@@ -5705,16 +5285,13 @@ class Index(_BaseIndex):
5705
5285
  to None.
5706
5286
 
5707
5287
  Returns:
5708
-
5709
5288
  Results of the search
5710
5289
 
5711
5290
  Raises:
5712
-
5713
5291
  MeilisearchCommunicationError: If there was an error communicating with the server.
5714
5292
  MeilisearchApiError: If the Meilisearch API returned an error.
5715
5293
 
5716
- Examples:
5717
-
5294
+ Examples
5718
5295
  >>> from meilisearch_python_sdk import Client
5719
5296
  >>> client = Client("http://localhost.com", "masterKey")
5720
5297
  >>> index = client.index("movies")
@@ -5744,20 +5321,16 @@ class Index(_BaseIndex):
5744
5321
  """Get one document with given document identifier.
5745
5322
 
5746
5323
  Args:
5747
-
5748
5324
  document_id: Unique identifier of the document.
5749
5325
 
5750
5326
  Returns:
5751
-
5752
5327
  The document information
5753
5328
 
5754
5329
  Raises:
5755
-
5756
5330
  MeilisearchCommunicationError: If there was an error communicating with the server.
5757
5331
  MeilisearchApiError: If the Meilisearch API returned an error.
5758
5332
 
5759
- Examples:
5760
-
5333
+ Examples
5761
5334
  >>> from meilisearch_python_sdk import Client
5762
5335
  >>> client = Client("http://localhost.com", "masterKey")
5763
5336
  >>> index = client.index("movies")
@@ -5778,7 +5351,6 @@ class Index(_BaseIndex):
5778
5351
  """Get a batch documents from the index.
5779
5352
 
5780
5353
  Args:
5781
-
5782
5354
  offset: Number of documents to skip. Defaults to 0.
5783
5355
  limit: Maximum number of documents returnedd. Defaults to 20.
5784
5356
  fields: Document attributes to show. If this value is None then all
@@ -5787,17 +5359,14 @@ class Index(_BaseIndex):
5787
5359
  used with Meilisearch >= v1.2.0
5788
5360
 
5789
5361
  Returns:
5790
-
5791
5362
  Documents info.
5792
5363
 
5793
5364
  Raises:
5794
-
5795
5365
  MeilisearchCommunicationError: If there was an error communicating with the server.
5796
5366
  MeilisearchApiError: If the Meilisearch API returned an error.
5797
5367
 
5798
5368
 
5799
- Examples:
5800
-
5369
+ Examples
5801
5370
  >>> from meilisearch_python_sdk import Client
5802
5371
  >>> client = Client("http://localhost.com", "masterKey")
5803
5372
  >>> index = client.index("movies")
@@ -5835,23 +5404,19 @@ class Index(_BaseIndex):
5835
5404
  """Add documents to the index.
5836
5405
 
5837
5406
  Args:
5838
-
5839
5407
  documents: List of documents.
5840
5408
  primary_key: The primary key of the documents. This will be ignored if already set.
5841
5409
  Defaults to None.
5842
5410
  compress: If set to True the data will be sent in gzip format. Defaults to False.
5843
5411
 
5844
5412
  Returns:
5845
-
5846
5413
  The details of the task.
5847
5414
 
5848
5415
  Raises:
5849
-
5850
5416
  MeilisearchCommunicationError: If there was an error communicating with the server.
5851
5417
  MeilisearchApiError: If the Meilisearch API returned an error.
5852
5418
 
5853
- Examples:
5854
-
5419
+ Examples
5855
5420
  >>> from meilisearch_python_sdk import Client
5856
5421
  >>> documents = [
5857
5422
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -5896,7 +5461,6 @@ class Index(_BaseIndex):
5896
5461
  """Adds documents in batches to reduce RAM usage with indexing.
5897
5462
 
5898
5463
  Args:
5899
-
5900
5464
  documents: List of documents.
5901
5465
  batch_size: The number of documents that should be included in each batch.
5902
5466
  Defaults to 1000.
@@ -5905,16 +5469,13 @@ class Index(_BaseIndex):
5905
5469
  compress: If set to True the data will be sent in gzip format. Defaults to False.
5906
5470
 
5907
5471
  Returns:
5908
-
5909
5472
  List of update ids to track the action.
5910
5473
 
5911
5474
  Raises:
5912
-
5913
5475
  MeilisearchCommunicationError: If there was an error communicating with the server.
5914
5476
  MeilisearchApiError: If the Meilisearch API returned an error.
5915
5477
 
5916
- Examples:
5917
-
5478
+ Examples
5918
5479
  >>> from meilisearch_python_sdk import Client
5919
5480
  >>> >>> documents = [
5920
5481
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -5942,7 +5503,6 @@ class Index(_BaseIndex):
5942
5503
  """Load all json files from a directory and add the documents to the index.
5943
5504
 
5944
5505
  Args:
5945
-
5946
5506
  directory_path: Path to the directory that contains the json files.
5947
5507
  primary_key: The primary key of the documents. This will be ignored if already set.
5948
5508
  Defaults to None.
@@ -5956,18 +5516,15 @@ class Index(_BaseIndex):
5956
5516
  compress: If set to True the data will be sent in gzip format. Defaults to False.
5957
5517
 
5958
5518
  Returns:
5959
-
5960
5519
  The details of the task status.
5961
5520
 
5962
5521
  Raises:
5963
-
5964
5522
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
5965
5523
  MeilisearchError: If the file path is not valid
5966
5524
  MeilisearchCommunicationError: If there was an error communicating with the server.
5967
5525
  MeilisearchApiError: If the Meilisearch API returned an error.
5968
5526
 
5969
- Examples:
5970
-
5527
+ Examples
5971
5528
  >>> from pathlib import Path
5972
5529
  >>> from meilisearch_python_sdk import Client
5973
5530
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -6020,7 +5577,6 @@ class Index(_BaseIndex):
6020
5577
  """Load all json files from a directory and add the documents to the index in batches.
6021
5578
 
6022
5579
  Args:
6023
-
6024
5580
  directory_path: Path to the directory that contains the json files.
6025
5581
  batch_size: The number of documents that should be included in each batch.
6026
5582
  Defaults to 1000.
@@ -6036,18 +5592,15 @@ class Index(_BaseIndex):
6036
5592
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6037
5593
 
6038
5594
  Returns:
6039
-
6040
5595
  List of update ids to track the action.
6041
5596
 
6042
5597
  Raises:
6043
-
6044
5598
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
6045
5599
  MeilisearchError: If the file path is not valid
6046
5600
  MeilisearchCommunicationError: If there was an error communicating with the server.
6047
5601
  MeilisearchApiError: If the Meilisearch API returned an error.
6048
5602
 
6049
- Examples:
6050
-
5603
+ Examples
6051
5604
  >>> from pathlib import Path
6052
5605
  >>> from meilisearch_python_sdk import Client
6053
5606
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -6106,25 +5659,21 @@ class Index(_BaseIndex):
6106
5659
  """Add documents to the index from a json file.
6107
5660
 
6108
5661
  Args:
6109
-
6110
5662
  file_path: Path to the json file.
6111
5663
  primary_key: The primary key of the documents. This will be ignored if already set.
6112
5664
  Defaults to None.
6113
5665
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6114
5666
 
6115
5667
  Returns:
6116
-
6117
5668
  The details of the task status.
6118
5669
 
6119
5670
  Raises:
6120
-
6121
5671
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
6122
5672
  MeilisearchError: If the file path is not valid
6123
5673
  MeilisearchCommunicationError: If there was an error communicating with the server.
6124
5674
  MeilisearchApiError: If the Meilisearch API returned an error.
6125
5675
 
6126
- Examples:
6127
-
5676
+ Examples
6128
5677
  >>> from pathlib import Path
6129
5678
  >>> from meilisearch_python_sdk import Client
6130
5679
  >>> file_path = Path("/path/to/file.json")
@@ -6148,7 +5697,6 @@ class Index(_BaseIndex):
6148
5697
  """Adds documents form a json file in batches to reduce RAM usage with indexing.
6149
5698
 
6150
5699
  Args:
6151
-
6152
5700
  file_path: Path to the json file.
6153
5701
  batch_size: The number of documents that should be included in each batch.
6154
5702
  Defaults to 1000.
@@ -6159,18 +5707,15 @@ class Index(_BaseIndex):
6159
5707
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6160
5708
 
6161
5709
  Returns:
6162
-
6163
5710
  List of update ids to track the action.
6164
5711
 
6165
5712
  Raises:
6166
-
6167
5713
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
6168
5714
  MeilisearchError: If the file path is not valid
6169
5715
  MeilisearchCommunicationError: If there was an error communicating with the server.
6170
5716
  MeilisearchApiError: If the Meilisearch API returned an error.
6171
5717
 
6172
- Examples:
6173
-
5718
+ Examples
6174
5719
  >>> from pathlib import Path
6175
5720
  >>> from meilisearch_python_sdk import Client
6176
5721
  >>> file_path = Path("/path/to/file.json")
@@ -6203,7 +5748,6 @@ class Index(_BaseIndex):
6203
5748
  for batching.
6204
5749
 
6205
5750
  Args:
6206
-
6207
5751
  file_path: The path to the file to send to Meilisearch. Only csv and ndjson files are
6208
5752
  allowed.
6209
5753
  primary_key: The primary key of the documents. This will be ignored if already set.
@@ -6213,19 +5757,16 @@ class Index(_BaseIndex):
6213
5757
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6214
5758
 
6215
5759
  Returns:
6216
-
6217
5760
  The details of the task.
6218
5761
 
6219
5762
  Raises:
6220
-
6221
5763
  ValueError: If the file is not a csv or ndjson file, or if a csv_delimiter is sent for
6222
5764
  a non-csv file.
6223
5765
  MeilisearchError: If the file path is not valid
6224
5766
  MeilisearchCommunicationError: If there was an error communicating with the server.
6225
5767
  MeilisearchApiError: If the Meilisearch API returned an error.
6226
5768
 
6227
- Examples:
6228
-
5769
+ Examples
6229
5770
  >>> from pathlib import Path
6230
5771
  >>> from meilisearch_python_sdk import Client
6231
5772
  >>> file_path = Path("/path/to/file.csv")
@@ -6283,23 +5824,19 @@ class Index(_BaseIndex):
6283
5824
  sending a PATCH request to /experimental-features with { "editDocumentsByFunction": true }.
6284
5825
 
6285
5826
  Args:
6286
-
6287
5827
  function: Rhai function to use to update the documents.
6288
5828
  context: Parameters to use in the function. Defaults to None.
6289
5829
  filter: Filter the documents before applying the function. Defaults to None.
6290
5830
 
6291
5831
  Returns:
6292
-
6293
5832
  The details of the task.
6294
5833
 
6295
5834
  Raises:
6296
-
6297
5835
  MeilisearchError: If the file path is not valid
6298
5836
  MeilisearchCommunicationError: If there was an error communicating with the server.
6299
5837
  MeilisearchApiError: If the Meilisearch API returned an error.
6300
5838
 
6301
- Examples:
6302
-
5839
+ Examples
6303
5840
  >>> from meilisearch_python_sdk import Client
6304
5841
  >>> client = Client("http://localhost.com", "masterKey")
6305
5842
  >>> index = client.index("movies")
@@ -6328,23 +5865,19 @@ class Index(_BaseIndex):
6328
5865
  """Update documents in the index.
6329
5866
 
6330
5867
  Args:
6331
-
6332
5868
  documents: List of documents.
6333
5869
  primary_key: The primary key of the documents. This will be ignored if already set.
6334
5870
  Defaults to None.
6335
5871
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6336
5872
 
6337
5873
  Returns:
6338
-
6339
5874
  The details of the task.
6340
5875
 
6341
5876
  Raises:
6342
-
6343
5877
  MeilisearchCommunicationError: If there was an error communicating with the server.
6344
5878
  MeilisearchApiError: If the Meilisearch API returned an error.
6345
5879
 
6346
- Examples:
6347
-
5880
+ Examples
6348
5881
  >>> from meilisearch_python_sdk import Client
6349
5882
  >>> documents = [
6350
5883
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -6393,7 +5926,6 @@ class Index(_BaseIndex):
6393
5926
  Each batch tries to fill the max_payload_size
6394
5927
 
6395
5928
  Args:
6396
-
6397
5929
  documents: List of documents.
6398
5930
  batch_size: The number of documents that should be included in each batch.
6399
5931
  Defaults to 1000.
@@ -6402,16 +5934,13 @@ class Index(_BaseIndex):
6402
5934
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6403
5935
 
6404
5936
  Returns:
6405
-
6406
5937
  List of update ids to track the action.
6407
5938
 
6408
5939
  Raises:
6409
-
6410
5940
  MeilisearchCommunicationError: If there was an error communicating with the server.
6411
5941
  MeilisearchApiError: If the Meilisearch API returned an error.
6412
5942
 
6413
- Examples:
6414
-
5943
+ Examples
6415
5944
  >>> from meilisearch_python_sdk import Client
6416
5945
  >>> documents = [
6417
5946
  >>> {"id": 1, "title": "Movie 1", "genre": "comedy"},
@@ -6439,7 +5968,6 @@ class Index(_BaseIndex):
6439
5968
  """Load all json files from a directory and update the documents.
6440
5969
 
6441
5970
  Args:
6442
-
6443
5971
  directory_path: Path to the directory that contains the json files.
6444
5972
  primary_key: The primary key of the documents. This will be ignored if already set.
6445
5973
  Defaults to None.
@@ -6453,18 +5981,15 @@ class Index(_BaseIndex):
6453
5981
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6454
5982
 
6455
5983
  Returns:
6456
-
6457
5984
  The details of the task status.
6458
5985
 
6459
5986
  Raises:
6460
-
6461
5987
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
6462
5988
  MeilisearchError: If the file path is not valid
6463
5989
  MeilisearchCommunicationError: If there was an error communicating with the server.
6464
5990
  MeilisearchApiError: If the Meilisearch API returned an error.
6465
5991
 
6466
- Examples:
6467
-
5992
+ Examples
6468
5993
  >>> from pathlib import Path
6469
5994
  >>> from meilisearch_python_sdk import Client
6470
5995
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -6516,7 +6041,6 @@ class Index(_BaseIndex):
6516
6041
  """Load all json files from a directory and update the documents.
6517
6042
 
6518
6043
  Args:
6519
-
6520
6044
  directory_path: Path to the directory that contains the json files.
6521
6045
  batch_size: The number of documents that should be included in each batch.
6522
6046
  Defaults to 1000.
@@ -6532,18 +6056,15 @@ class Index(_BaseIndex):
6532
6056
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6533
6057
 
6534
6058
  Returns:
6535
-
6536
6059
  List of update ids to track the action.
6537
6060
 
6538
6061
  Raises:
6539
-
6540
6062
  InvalidDocumentError: If the docucment is not a valid format for Meilisearch.
6541
6063
  MeilisearchError: If the file path is not valid
6542
6064
  MeilisearchCommunicationError: If there was an error communicating with the server.
6543
6065
  MeilisearchApiError: If the Meilisearch API returned an error.
6544
6066
 
6545
- Examples:
6546
-
6067
+ Examples
6547
6068
  >>> from pathlib import Path
6548
6069
  >>> from meilisearch_python_sdk import Client
6549
6070
  >>> directory_path = Path("/path/to/directory/containing/files")
@@ -6604,7 +6125,6 @@ class Index(_BaseIndex):
6604
6125
  """Add documents in the index from a json file.
6605
6126
 
6606
6127
  Args:
6607
-
6608
6128
  file_path: Path to the json file.
6609
6129
  primary_key: The primary key of the documents. This will be ignored if already set.
6610
6130
  Defaults to None.
@@ -6613,16 +6133,13 @@ class Index(_BaseIndex):
6613
6133
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6614
6134
 
6615
6135
  Returns:
6616
-
6617
6136
  The details of the task status.
6618
6137
 
6619
6138
  Raises:
6620
-
6621
6139
  MeilisearchCommunicationError: If there was an error communicating with the server.
6622
6140
  MeilisearchApiError: If the Meilisearch API returned an error.
6623
6141
 
6624
- Examples:
6625
-
6142
+ Examples
6626
6143
  >>> from pathlib import Path
6627
6144
  >>> from meilisearch_python_sdk import Client
6628
6145
  >>> file_path = Path("/path/to/file.json")
@@ -6647,7 +6164,6 @@ class Index(_BaseIndex):
6647
6164
  """Updates documents form a json file in batches to reduce RAM usage with indexing.
6648
6165
 
6649
6166
  Args:
6650
-
6651
6167
  file_path: Path to the json file.
6652
6168
  batch_size: The number of documents that should be included in each batch.
6653
6169
  Defaults to 1000.
@@ -6656,16 +6172,13 @@ class Index(_BaseIndex):
6656
6172
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6657
6173
 
6658
6174
  Returns:
6659
-
6660
6175
  List of update ids to track the action.
6661
6176
 
6662
6177
  Raises:
6663
-
6664
6178
  MeilisearchCommunicationError: If there was an error communicating with the server.
6665
6179
  MeilisearchApiError: If the Meilisearch API returned an error.
6666
6180
 
6667
- Examples:
6668
-
6181
+ Examples
6669
6182
  >>> from pathlib import Path
6670
6183
  >>> from meilisearch_python_sdk import Client
6671
6184
  >>> file_path = Path("/path/to/file.json")
@@ -6696,7 +6209,6 @@ class Index(_BaseIndex):
6696
6209
  for batching.
6697
6210
 
6698
6211
  Args:
6699
-
6700
6212
  file_path: The path to the file to send to Meilisearch. Only csv and ndjson files are
6701
6213
  allowed.
6702
6214
  primary_key: The primary key of the documents. This will be ignored if already set.
@@ -6706,19 +6218,16 @@ class Index(_BaseIndex):
6706
6218
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6707
6219
 
6708
6220
  Returns:
6709
-
6710
6221
  The details of the task status.
6711
6222
 
6712
6223
  Raises:
6713
-
6714
6224
  ValueError: If the file is not a csv or ndjson file, or if a csv_delimiter is sent for
6715
6225
  a non-csv file.
6716
6226
  MeilisearchError: If the file path is not valid
6717
6227
  MeilisearchCommunicationError: If there was an error communicating with the server.
6718
6228
  MeilisearchApiError: If the Meilisearch API returned an error.
6719
6229
 
6720
- Examples:
6721
-
6230
+ Examples
6722
6231
  >>> from pathlib import Path
6723
6232
  >>> from meilisearch_python_sdk import Client
6724
6233
  >>> file_path = Path("/path/to/file.csv")
@@ -6770,20 +6279,16 @@ class Index(_BaseIndex):
6770
6279
  """Delete one document from the index.
6771
6280
 
6772
6281
  Args:
6773
-
6774
6282
  document_id: Unique identifier of the document.
6775
6283
 
6776
6284
  Returns:
6777
-
6778
6285
  The details of the task status.
6779
6286
 
6780
6287
  Raises:
6781
-
6782
6288
  MeilisearchCommunicationError: If there was an error communicating with the server.
6783
6289
  MeilisearchApiError: If the Meilisearch API returned an error.
6784
6290
 
6785
- Examples:
6786
-
6291
+ Examples
6787
6292
  >>> from meilisearch_python_sdk import Client
6788
6293
  >>> client = Client("http://localhost.com", "masterKey")
6789
6294
  >>> index = client.index("movies")
@@ -6807,20 +6312,16 @@ class Index(_BaseIndex):
6807
6312
  """Delete multiple documents from the index.
6808
6313
 
6809
6314
  Args:
6810
-
6811
6315
  ids: List of unique identifiers of documents.
6812
6316
 
6813
6317
  Returns:
6814
-
6815
6318
  List of update ids to track the action.
6816
6319
 
6817
6320
  Raises:
6818
-
6819
6321
  MeilisearchCommunicationError: If there was an error communicating with the server.
6820
6322
  MeilisearchApiError: If the Meilisearch API returned an error.
6821
6323
 
6822
- Examples:
6823
-
6324
+ Examples
6824
6325
  >>> from meilisearch_python_sdk import Client
6825
6326
  >>> client = Client("http://localhost.com", "masterKey")
6826
6327
  >>> index = client.index("movies")
@@ -6844,20 +6345,16 @@ class Index(_BaseIndex):
6844
6345
  """Delete documents from the index by filter.
6845
6346
 
6846
6347
  Args:
6847
-
6848
6348
  filter: The filter value information.
6849
6349
 
6850
6350
  Returns:
6851
-
6852
6351
  The details of the task status.
6853
6352
 
6854
6353
  Raises:
6855
-
6856
6354
  MeilisearchCommunicationError: If there was an error communicating with the server.
6857
6355
  MeilisearchApiError: If the Meilisearch API returned an error.
6858
6356
 
6859
- Examples:
6860
-
6357
+ Examples
6861
6358
  >>> from meilisearch_python_sdk import Client
6862
6359
  >>> client = Client("http://localhost.com", "masterKey")
6863
6360
  >>> index = client.index("movies")
@@ -6887,20 +6384,16 @@ class Index(_BaseIndex):
6887
6384
  """Delete batches of documents from the index by filter.
6888
6385
 
6889
6386
  Args:
6890
-
6891
6387
  filters: A list of filter value information.
6892
6388
 
6893
6389
  Returns:
6894
-
6895
6390
  The a list of details of the task statuses.
6896
6391
 
6897
6392
  Raises:
6898
-
6899
6393
  MeilisearchCommunicationError: If there was an error communicating with the server.
6900
6394
  MeilisearchApiError: If the Meilisearch API returned an error.
6901
6395
 
6902
- Examples:
6903
-
6396
+ Examples
6904
6397
  >>> from meilisearch_python_sdk import Client
6905
6398
  >>> client = Client("http://localhost.com", "masterKey")
6906
6399
  >>> index = client.index("movies")
@@ -6917,16 +6410,13 @@ class Index(_BaseIndex):
6917
6410
  """Delete all documents from the index.
6918
6411
 
6919
6412
  Returns:
6920
-
6921
6413
  The details of the task status.
6922
6414
 
6923
6415
  Raises:
6924
-
6925
6416
  MeilisearchCommunicationError: If there was an error communicating with the server.
6926
6417
  MeilisearchApiError: If the Meilisearch API returned an error.
6927
6418
 
6928
- Examples:
6929
-
6419
+ Examples
6930
6420
  >>> from meilisearch_python_sdk import Client
6931
6421
  >>> client = Client("http://localhost.com", "masterKey")
6932
6422
  >>> index = client.index("movies")
@@ -6950,16 +6440,13 @@ class Index(_BaseIndex):
6950
6440
  """Get settings of the index.
6951
6441
 
6952
6442
  Returns:
6953
-
6954
6443
  Settings of the index.
6955
6444
 
6956
6445
  Raises:
6957
-
6958
6446
  MeilisearchCommunicationError: If there was an error communicating with the server.
6959
6447
  MeilisearchApiError: If the Meilisearch API returned an error.
6960
6448
 
6961
- Examples:
6962
-
6449
+ Examples
6963
6450
  >>> from meilisearch_python_sdk import Client
6964
6451
  >>> client = Client("http://localhost.com", "masterKey")
6965
6452
  >>> index = client.index("movies")
@@ -6981,21 +6468,17 @@ class Index(_BaseIndex):
6981
6468
  """Update settings of the index.
6982
6469
 
6983
6470
  Args:
6984
-
6985
6471
  body: Settings of the index.
6986
6472
  compress: If set to True the data will be sent in gzip format. Defaults to False.
6987
6473
 
6988
6474
  Returns:
6989
-
6990
6475
  The details of the task status.
6991
6476
 
6992
6477
  Raises:
6993
-
6994
6478
  MeilisearchCommunicationError: If there was an error communicating with the server.
6995
6479
  MeilisearchApiError: If the Meilisearch API returned an error.
6996
6480
 
6997
- Examples:
6998
-
6481
+ Examples
6999
6482
  >>> from meilisearch_python_sdk import Client
7000
6483
  >>> from meilisearch_python_sdk import MeilisearchSettings
7001
6484
  >>> new_settings = MeilisearchSettings(
@@ -7021,7 +6504,11 @@ class Index(_BaseIndex):
7021
6504
  >>> index = client.index("movies")
7022
6505
  >>> index.update_settings(new_settings)
7023
6506
  """
7024
- body_dict = {k: v for k, v in body.model_dump(by_alias=True).items() if v is not None}
6507
+ body_dict = {
6508
+ k: v
6509
+ for k, v in body.model_dump(by_alias=True, exclude_none=True).items()
6510
+ if v is not None
6511
+ }
7025
6512
  response = self._http_requests.patch(self._settings_url, body_dict, compress=compress)
7026
6513
 
7027
6514
  return TaskInfo(**response.json())
@@ -7030,16 +6517,13 @@ class Index(_BaseIndex):
7030
6517
  """Reset settings of the index to default values.
7031
6518
 
7032
6519
  Returns:
7033
-
7034
6520
  The details of the task status.
7035
6521
 
7036
6522
  Raises:
7037
-
7038
6523
  MeilisearchCommunicationError: If there was an error communicating with the server.
7039
6524
  MeilisearchApiError: If the Meilisearch API returned an error.
7040
6525
 
7041
- Examples:
7042
-
6526
+ Examples
7043
6527
  >>> from meilisearch_python_sdk import Client
7044
6528
  >>> client = Client("http://localhost.com", "masterKey")
7045
6529
  >>> index = client.index("movies")
@@ -7053,16 +6537,13 @@ class Index(_BaseIndex):
7053
6537
  """Get ranking rules of the index.
7054
6538
 
7055
6539
  Returns:
7056
-
7057
6540
  List containing the ranking rules of the index.
7058
6541
 
7059
6542
  Raises:
7060
-
7061
6543
  MeilisearchCommunicationError: If there was an error communicating with the server.
7062
6544
  MeilisearchApiError: If the Meilisearch API returned an error.
7063
6545
 
7064
- Examples:
7065
-
6546
+ Examples
7066
6547
  >>> from meilisearch_python_sdk import Client
7067
6548
  >>> client = Client("http://localhost.com", "masterKey")
7068
6549
  >>> index = client.index("movies")
@@ -7076,21 +6557,17 @@ class Index(_BaseIndex):
7076
6557
  """Update ranking rules of the index.
7077
6558
 
7078
6559
  Args:
7079
-
7080
6560
  ranking_rules: List containing the ranking rules.
7081
6561
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7082
6562
 
7083
6563
  Returns:
7084
-
7085
6564
  The details of the task status.
7086
6565
 
7087
6566
  Raises:
7088
-
7089
6567
  MeilisearchCommunicationError: If there was an error communicating with the server.
7090
6568
  MeilisearchApiError: If the Meilisearch API returned an error.
7091
6569
 
7092
- Examples:
7093
-
6570
+ Examples
7094
6571
  >>> from meilisearch_python_sdk import Client
7095
6572
  >>> ranking_rules=[
7096
6573
  >>> "words",
@@ -7116,16 +6593,13 @@ class Index(_BaseIndex):
7116
6593
  """Reset ranking rules of the index to default values.
7117
6594
 
7118
6595
  Returns:
7119
-
7120
6596
  The details of the task status.
7121
6597
 
7122
6598
  Raises:
7123
-
7124
6599
  MeilisearchCommunicationError: If there was an error communicating with the server.
7125
6600
  MeilisearchApiError: If the Meilisearch API returned an error.
7126
6601
 
7127
- Examples:
7128
-
6602
+ Examples
7129
6603
  >>> from meilisearch_python_sdk import Client
7130
6604
  >>> client = Client("http://localhost.com", "masterKey")
7131
6605
  >>> index = client.index("movies")
@@ -7139,17 +6613,14 @@ class Index(_BaseIndex):
7139
6613
  """Get distinct attribute of the index.
7140
6614
 
7141
6615
  Returns:
7142
-
7143
6616
  String containing the distinct attribute of the index. If no distinct attribute
7144
6617
  `None` is returned.
7145
6618
 
7146
6619
  Raises:
7147
-
7148
6620
  MeilisearchCommunicationError: If there was an error communicating with the server.
7149
6621
  MeilisearchApiError: If the Meilisearch API returned an error.
7150
6622
 
7151
- Examples:
7152
-
6623
+ Examples
7153
6624
  >>> from meilisearch_python_sdk import Client
7154
6625
  >>> client = Client("http://localhost.com", "masterKey")
7155
6626
  >>> index = client.index("movies")
@@ -7166,21 +6637,17 @@ class Index(_BaseIndex):
7166
6637
  """Update distinct attribute of the index.
7167
6638
 
7168
6639
  Args:
7169
-
7170
6640
  body: Distinct attribute.
7171
6641
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7172
6642
 
7173
6643
  Returns:
7174
-
7175
6644
  The details of the task status.
7176
6645
 
7177
6646
  Raises:
7178
-
7179
6647
  MeilisearchCommunicationError: If there was an error communicating with the server.
7180
6648
  MeilisearchApiError: If the Meilisearch API returned an error.
7181
6649
 
7182
- Examples:
7183
-
6650
+ Examples
7184
6651
  >>> from meilisearch_python_sdk import Client
7185
6652
  >>> client = Client("http://localhost.com", "masterKey")
7186
6653
  >>> index = client.index("movies")
@@ -7196,16 +6663,13 @@ class Index(_BaseIndex):
7196
6663
  """Reset distinct attribute of the index to default values.
7197
6664
 
7198
6665
  Returns:
7199
-
7200
6666
  The details of the task status.
7201
6667
 
7202
6668
  Raises:
7203
-
7204
6669
  MeilisearchCommunicationError: If there was an error communicating with the server.
7205
6670
  MeilisearchApiError: If the Meilisearch API returned an error.
7206
6671
 
7207
- Examples:
7208
-
6672
+ Examples
7209
6673
  >>> from meilisearch_python_sdk import Client
7210
6674
  >>> client = Client("http://localhost.com", "masterKey")
7211
6675
  >>> index = client.index("movies")
@@ -7219,16 +6683,13 @@ class Index(_BaseIndex):
7219
6683
  """Get searchable attributes of the index.
7220
6684
 
7221
6685
  Returns:
7222
-
7223
6686
  List containing the searchable attributes of the index.
7224
6687
 
7225
6688
  Raises:
7226
-
7227
6689
  MeilisearchCommunicationError: If there was an error communicating with the server.
7228
6690
  MeilisearchApiError: If the Meilisearch API returned an error.
7229
6691
 
7230
- Examples:
7231
-
6692
+ Examples
7232
6693
  >>> from meilisearch_python_sdk import Client
7233
6694
  >>> client = Client("http://localhost.com", "masterKey")
7234
6695
  >>> index = client.index("movies")
@@ -7242,21 +6703,17 @@ class Index(_BaseIndex):
7242
6703
  """Update searchable attributes of the index.
7243
6704
 
7244
6705
  Args:
7245
-
7246
6706
  body: List containing the searchable attributes.
7247
6707
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7248
6708
 
7249
6709
  Returns:
7250
-
7251
6710
  The details of the task status.
7252
6711
 
7253
6712
  Raises:
7254
-
7255
6713
  MeilisearchCommunicationError: If there was an error communicating with the server.
7256
6714
  MeilisearchApiError: If the Meilisearch API returned an error.
7257
6715
 
7258
- Examples:
7259
-
6716
+ Examples
7260
6717
  >>> from meilisearch_python_sdk import Client
7261
6718
  >>> client = Client("http://localhost.com", "masterKey")
7262
6719
  >>> index = client.index("movies")
@@ -7272,16 +6729,13 @@ class Index(_BaseIndex):
7272
6729
  """Reset searchable attributes of the index to default values.
7273
6730
 
7274
6731
  Returns:
7275
-
7276
6732
  The details of the task status.
7277
6733
 
7278
6734
  Raises:
7279
-
7280
6735
  MeilisearchCommunicationError: If there was an error communicating with the server.
7281
6736
  MeilisearchApiError: If the Meilisearch API returned an error.
7282
6737
 
7283
- Examples:
7284
-
6738
+ Examples
7285
6739
  >>> from meilisearch_python_sdk import Client
7286
6740
  >>> client = Client("http://localhost.com", "masterKey")
7287
6741
  >>> index = client.index("movies")
@@ -7295,16 +6749,13 @@ class Index(_BaseIndex):
7295
6749
  """Get displayed attributes of the index.
7296
6750
 
7297
6751
  Returns:
7298
-
7299
6752
  List containing the displayed attributes of the index.
7300
6753
 
7301
6754
  Raises:
7302
-
7303
6755
  MeilisearchCommunicationError: If there was an error communicating with the server.
7304
6756
  MeilisearchApiError: If the Meilisearch API returned an error.
7305
6757
 
7306
- Examples:
7307
-
6758
+ Examples
7308
6759
  >>> from meilisearch_python_sdk import Client
7309
6760
  >>> client = Client("http://localhost.com", "masterKey")
7310
6761
  >>> index = client.index("movies")
@@ -7318,21 +6769,17 @@ class Index(_BaseIndex):
7318
6769
  """Update displayed attributes of the index.
7319
6770
 
7320
6771
  Args:
7321
-
7322
6772
  body: List containing the displayed attributes.
7323
6773
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7324
6774
 
7325
6775
  Returns:
7326
-
7327
6776
  The details of the task status.
7328
6777
 
7329
6778
  Raises:
7330
-
7331
6779
  MeilisearchCommunicationError: If there was an error communicating with the server.
7332
6780
  MeilisearchApiError: If the Meilisearch API returned an error.
7333
6781
 
7334
- Examples:
7335
-
6782
+ Examples
7336
6783
  >>> from meilisearch_python_sdk import Client
7337
6784
  >>> client = Client("http://localhost.com", "masterKey")
7338
6785
  >>> index = client.index("movies")
@@ -7350,16 +6797,13 @@ class Index(_BaseIndex):
7350
6797
  """Reset displayed attributes of the index to default values.
7351
6798
 
7352
6799
  Returns:
7353
-
7354
6800
  The details of the task status.
7355
6801
 
7356
6802
  Raises:
7357
-
7358
6803
  MeilisearchCommunicationError: If there was an error communicating with the server.
7359
6804
  MeilisearchApiError: If the Meilisearch API returned an error.
7360
6805
 
7361
- Examples:
7362
-
6806
+ Examples
7363
6807
  >>> from meilisearch_python_sdk import Client
7364
6808
  >>> client = Client("http://localhost.com", "masterKey")
7365
6809
  >>> index = client.index("movies")
@@ -7373,16 +6817,13 @@ class Index(_BaseIndex):
7373
6817
  """Get stop words of the index.
7374
6818
 
7375
6819
  Returns:
7376
-
7377
6820
  List containing the stop words of the index.
7378
6821
 
7379
6822
  Raises:
7380
-
7381
6823
  MeilisearchCommunicationError: If there was an error communicating with the server.
7382
6824
  MeilisearchApiError: If the Meilisearch API returned an error.
7383
6825
 
7384
- Examples:
7385
-
6826
+ Examples
7386
6827
  >>> from meilisearch_python_sdk import Client
7387
6828
  >>> client = Client("http://localhost.com", "masterKey")
7388
6829
  >>> index = client.index("movies")
@@ -7399,21 +6840,17 @@ class Index(_BaseIndex):
7399
6840
  """Update stop words of the index.
7400
6841
 
7401
6842
  Args:
7402
-
7403
6843
  body: List containing the stop words of the index.
7404
6844
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7405
6845
 
7406
6846
  Returns:
7407
-
7408
6847
  The details of the task status.
7409
6848
 
7410
6849
  Raises:
7411
-
7412
6850
  MeilisearchCommunicationError: If there was an error communicating with the server.
7413
6851
  MeilisearchApiError: If the Meilisearch API returned an error.
7414
6852
 
7415
- Examples:
7416
-
6853
+ Examples
7417
6854
  >>> from meilisearch_python_sdk import Client
7418
6855
  >>> client = Client("http://localhost.com", "masterKey")
7419
6856
  >>> index = client.index("movies")
@@ -7429,16 +6866,13 @@ class Index(_BaseIndex):
7429
6866
  """Reset stop words of the index to default values.
7430
6867
 
7431
6868
  Returns:
7432
-
7433
6869
  The details of the task status.
7434
6870
 
7435
6871
  Raises:
7436
-
7437
6872
  MeilisearchCommunicationError: If there was an error communicating with the server.
7438
6873
  MeilisearchApiError: If the Meilisearch API returned an error.
7439
6874
 
7440
- Examples:
7441
-
6875
+ Examples
7442
6876
  >>> from meilisearch_python_sdk import Client
7443
6877
  >>> client = Client("http://localhost.com", "masterKey")
7444
6878
  >>> index = client.index("movies")
@@ -7452,16 +6886,13 @@ class Index(_BaseIndex):
7452
6886
  """Get synonyms of the index.
7453
6887
 
7454
6888
  Returns:
7455
-
7456
6889
  The synonyms of the index.
7457
6890
 
7458
6891
  Raises:
7459
-
7460
6892
  MeilisearchCommunicationError: If there was an error communicating with the server.
7461
6893
  MeilisearchApiError: If the Meilisearch API returned an error.
7462
6894
 
7463
- Examples:
7464
-
6895
+ Examples
7465
6896
  >>> from meilisearch_python_sdk import Client
7466
6897
  >>> client = Client("http://localhost.com", "masterKey")
7467
6898
  >>> index = client.index("movies")
@@ -7478,20 +6909,16 @@ class Index(_BaseIndex):
7478
6909
  """Update synonyms of the index.
7479
6910
 
7480
6911
  Args:
7481
-
7482
6912
  body: The synonyms of the index.
7483
6913
 
7484
6914
  Returns:
7485
-
7486
6915
  The details of the task status.
7487
6916
 
7488
6917
  Raises:
7489
-
7490
6918
  MeilisearchCommunicationError: If there was an error communicating with the server.
7491
6919
  MeilisearchApiError: If the Meilisearch API returned an error.
7492
6920
 
7493
- Examples:
7494
-
6921
+ Examples
7495
6922
  >>> from meilisearch_python_sdk import Client
7496
6923
  >>> client = Client("http://localhost.com", "masterKey") as client:
7497
6924
  >>> index = client.index("movies")
@@ -7509,16 +6936,13 @@ class Index(_BaseIndex):
7509
6936
  """Reset synonyms of the index to default values.
7510
6937
 
7511
6938
  Returns:
7512
-
7513
6939
  The details of the task status.
7514
6940
 
7515
6941
  Raises:
7516
-
7517
6942
  MeilisearchCommunicationError: If there was an error communicating with the server.
7518
6943
  MeilisearchApiError: If the Meilisearch API returned an error.
7519
6944
 
7520
- Examples:
7521
-
6945
+ Examples
7522
6946
  >>> from meilisearch_python_sdk import Client
7523
6947
  >>> client = Client("http://localhost.com", "masterKey")
7524
6948
  >>> index = client.index("movies")
@@ -7532,16 +6956,13 @@ class Index(_BaseIndex):
7532
6956
  """Get filterable attributes of the index.
7533
6957
 
7534
6958
  Returns:
7535
-
7536
6959
  List containing the filterable attributes of the index.
7537
6960
 
7538
6961
  Raises:
7539
-
7540
6962
  MeilisearchCommunicationError: If there was an error communicating with the server.
7541
6963
  MeilisearchApiError: If the Meilisearch API returned an error.
7542
6964
 
7543
- Examples:
7544
-
6965
+ Examples
7545
6966
  >>> from meilisearch_python_sdk import Client
7546
6967
  >>> client = Client("http://localhost.com", "masterKey")
7547
6968
  >>> index = client.index("movies")
@@ -7558,21 +6979,17 @@ class Index(_BaseIndex):
7558
6979
  """Update filterable attributes of the index.
7559
6980
 
7560
6981
  Args:
7561
-
7562
6982
  body: List containing the filterable attributes of the index.
7563
6983
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7564
6984
 
7565
6985
  Returns:
7566
-
7567
6986
  The details of the task status.
7568
6987
 
7569
6988
  Raises:
7570
-
7571
6989
  MeilisearchCommunicationError: If there was an error communicating with the server.
7572
6990
  MeilisearchApiError: If the Meilisearch API returned an error.
7573
6991
 
7574
- Examples:
7575
-
6992
+ Examples
7576
6993
  >>> from meilisearch_python_sdk import Client
7577
6994
  >>> client = Client("http://localhost.com", "masterKey")
7578
6995
  >>> index = client.index("movies")
@@ -7588,16 +7005,13 @@ class Index(_BaseIndex):
7588
7005
  """Reset filterable attributes of the index to default values.
7589
7006
 
7590
7007
  Returns:
7591
-
7592
7008
  The details of the task status.
7593
7009
 
7594
7010
  Raises:
7595
-
7596
7011
  MeilisearchCommunicationError: If there was an error communicating with the server.
7597
7012
  MeilisearchApiError: If the Meilisearch API returned an error.
7598
7013
 
7599
- Examples:
7600
-
7014
+ Examples
7601
7015
  >>> from meilisearch_python_sdk import Client
7602
7016
  >>> client = Client("http://localhost.com", "masterKey")
7603
7017
  >>> index = client.index("movies")
@@ -7611,16 +7025,13 @@ class Index(_BaseIndex):
7611
7025
  """Get sortable attributes of the AsyncIndex.
7612
7026
 
7613
7027
  Returns:
7614
-
7615
7028
  List containing the sortable attributes of the AsyncIndex.
7616
7029
 
7617
7030
  Raises:
7618
-
7619
7031
  MeilisearchCommunicationError: If there was an error communicating with the server.
7620
7032
  MeilisearchApiError: If the Meilisearch API returned an error.
7621
7033
 
7622
- Examples:
7623
-
7034
+ Examples
7624
7035
  >>> from meilisearch_python_sdk import Client
7625
7036
  >>> client = Client("http://localhost.com", "masterKey")
7626
7037
  >>> index = client.index("movies")
@@ -7636,21 +7047,17 @@ class Index(_BaseIndex):
7636
7047
  """Get sortable attributes of the AsyncIndex.
7637
7048
 
7638
7049
  Args:
7639
-
7640
7050
  sortable_attributes: List of attributes for searching.
7641
7051
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7642
7052
 
7643
7053
  Returns:
7644
-
7645
7054
  The details of the task status.
7646
7055
 
7647
7056
  Raises:
7648
-
7649
7057
  MeilisearchCommunicationError: If there was an error communicating with the server.
7650
7058
  MeilisearchApiError: If the Meilisearch API returned an error.
7651
7059
 
7652
- Examples:
7653
-
7060
+ Examples
7654
7061
  >>> from meilisearch_python_sdk import Client
7655
7062
  >>> client = Client("http://localhost.com", "masterKey")
7656
7063
  >>> index = client.index("movies")
@@ -7666,16 +7073,13 @@ class Index(_BaseIndex):
7666
7073
  """Reset sortable attributes of the index to default values.
7667
7074
 
7668
7075
  Returns:
7669
-
7670
7076
  The details of the task status.
7671
7077
 
7672
7078
  Raises:
7673
-
7674
7079
  MeilisearchCommunicationError: If there was an error communicating with the server.
7675
7080
  MeilisearchApiError: If the Meilisearch API returned an error.
7676
7081
 
7677
- Examples:
7678
-
7082
+ Examples
7679
7083
  >>> from meilisearch_python_sdk import Client
7680
7084
  >>> client = Client("http://localhost.com", "masterKey")
7681
7085
  >>> index = client.index("movies")
@@ -7689,16 +7093,13 @@ class Index(_BaseIndex):
7689
7093
  """Get typo tolerance for the index.
7690
7094
 
7691
7095
  Returns:
7692
-
7693
7096
  TypoTolerance for the index.
7694
7097
 
7695
7098
  Raises:
7696
-
7697
7099
  MeilisearchCommunicationError: If there was an error communicating with the server.
7698
7100
  MeilisearchApiError: If the Meilisearch API returned an error.
7699
7101
 
7700
- Examples:
7701
-
7102
+ Examples
7702
7103
  >>> from meilisearch_python_sdk import Client
7703
7104
  >>> client = Client("http://localhost.com", "masterKey")
7704
7105
  >>> index = client.index("movies")
@@ -7714,21 +7115,17 @@ class Index(_BaseIndex):
7714
7115
  """Update typo tolerance.
7715
7116
 
7716
7117
  Args:
7717
-
7718
7118
  typo_tolerance: Typo tolerance settings.
7719
7119
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7720
7120
 
7721
7121
  Returns:
7722
-
7723
7122
  Task to track the action.
7724
7123
 
7725
7124
  Raises:
7726
-
7727
7125
  MeilisearchCommunicationError: If there was an error communicating with the server.
7728
7126
  MeilisearchApiError: If the Meilisearch API returned an error.
7729
7127
 
7730
- Examples:
7731
-
7128
+ Examples
7732
7129
  >>> from meilisearch_python_sdk import Client
7733
7130
  >>> client = Client("http://localhost.com", "masterKey")
7734
7131
  >>> index = client.index("movies")
@@ -7747,16 +7144,13 @@ class Index(_BaseIndex):
7747
7144
  """Reset typo tolerance to default values.
7748
7145
 
7749
7146
  Returns:
7750
-
7751
7147
  The details of the task status.
7752
7148
 
7753
7149
  Raises:
7754
-
7755
7150
  MeilisearchCommunicationError: If there was an error communicating with the server.
7756
7151
  MeilisearchApiError: If the Meilisearch API returned an error.
7757
7152
 
7758
- Examples:
7759
-
7153
+ Examples
7760
7154
  >>> from meilisearch_python_sdk import Client
7761
7155
  >>> client = Client("http://localhost.com", "masterKey")
7762
7156
  >>> index = client.index("movies")
@@ -7770,16 +7164,13 @@ class Index(_BaseIndex):
7770
7164
  """Get faceting for the index.
7771
7165
 
7772
7166
  Returns:
7773
-
7774
7167
  Faceting for the index.
7775
7168
 
7776
7169
  Raises:
7777
-
7778
7170
  MeilisearchCommunicationError: If there was an error communicating with the server.
7779
7171
  MeilisearchApiError: If the Meilisearch API returned an error.
7780
7172
 
7781
- Examples:
7782
-
7173
+ Examples
7783
7174
  >>> from meilisearch_python_sdk import Client
7784
7175
  >>> client = Client("http://localhost.com", "masterKey")
7785
7176
  >>> index = client.index("movies")
@@ -7793,21 +7184,17 @@ class Index(_BaseIndex):
7793
7184
  """Partially update the faceting settings for an index.
7794
7185
 
7795
7186
  Args:
7796
-
7797
7187
  faceting: Faceting values.
7798
7188
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7799
7189
 
7800
7190
  Returns:
7801
-
7802
7191
  Task to track the action.
7803
7192
 
7804
7193
  Raises:
7805
-
7806
7194
  MeilisearchCommunicationError: If there was an error communicating with the server.
7807
7195
  MeilisearchApiError: If the Meilisearch API returned an error.
7808
7196
 
7809
- Examples:
7810
-
7197
+ Examples
7811
7198
  >>> from meilisearch_python_sdk import Client
7812
7199
  >>> client = Client("http://localhost.com", "masterKey")
7813
7200
  >>> index = client.index("movies")
@@ -7825,16 +7212,13 @@ class Index(_BaseIndex):
7825
7212
  """Reset an index's faceting settings to their default value.
7826
7213
 
7827
7214
  Returns:
7828
-
7829
7215
  The details of the task status.
7830
7216
 
7831
7217
  Raises:
7832
-
7833
7218
  MeilisearchCommunicationError: If there was an error communicating with the server.
7834
7219
  MeilisearchApiError: If the Meilisearch API returned an error.
7835
7220
 
7836
- Examples:
7837
-
7221
+ Examples
7838
7222
  >>> from meilisearch_python_sdk import Client
7839
7223
  >>> client = Client("http://localhost.com", "masterKey")
7840
7224
  >>> index = client.index("movies")
@@ -7848,16 +7232,13 @@ class Index(_BaseIndex):
7848
7232
  """Get pagination settings for the index.
7849
7233
 
7850
7234
  Returns:
7851
-
7852
7235
  Pagination for the index.
7853
7236
 
7854
7237
  Raises:
7855
-
7856
7238
  MeilisearchCommunicationError: If there was an error communicating with the server.
7857
7239
  MeilisearchApiError: If the Meilisearch API returned an error.
7858
7240
 
7859
- Examples:
7860
-
7241
+ Examples
7861
7242
  >>> from meilisearch_async_client import Client
7862
7243
  >>> client = Client("http://localhost.com", "masterKey")
7863
7244
  >>> index = client.index("movies")
@@ -7871,21 +7252,17 @@ class Index(_BaseIndex):
7871
7252
  """Partially update the pagination settings for an index.
7872
7253
 
7873
7254
  Args:
7874
-
7875
7255
  settings: settings for pagination.
7876
7256
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7877
7257
 
7878
7258
  Returns:
7879
-
7880
7259
  Task to track the action.
7881
7260
 
7882
7261
  Raises:
7883
-
7884
7262
  MeilisearchCommunicationError: If there was an error communicating with the server.
7885
7263
  MeilisearchApiError: If the Meilisearch API returned an error.
7886
7264
 
7887
- Examples:
7888
-
7265
+ Examples
7889
7266
  >>> from meilisearch_python_sdk import Client
7890
7267
  >>> from meilisearch_python_sdk.models.settings import Pagination
7891
7268
  >>> client = Client("http://localhost.com", "masterKey")
@@ -7904,16 +7281,13 @@ class Index(_BaseIndex):
7904
7281
  """Reset an index's pagination settings to their default value.
7905
7282
 
7906
7283
  Returns:
7907
-
7908
7284
  The details of the task status.
7909
7285
 
7910
7286
  Raises:
7911
-
7912
7287
  MeilisearchCommunicationError: If there was an error communicating with the server.
7913
7288
  MeilisearchApiError: If the Meilisearch API returned an error.
7914
7289
 
7915
- Examples:
7916
-
7290
+ Examples
7917
7291
  >>> from meilisearch_async_client import Client
7918
7292
  >>> client = Client("http://localhost.com", "masterKey")
7919
7293
  >>> index = client.index("movies")
@@ -7927,16 +7301,13 @@ class Index(_BaseIndex):
7927
7301
  """Get separator token settings for the index.
7928
7302
 
7929
7303
  Returns:
7930
-
7931
7304
  Separator tokens for the index.
7932
7305
 
7933
7306
  Raises:
7934
-
7935
7307
  MeilisearchCommunicationError: If there was an error communicating with the server.
7936
7308
  MeilisearchApiError: If the Meilisearch API returned an error.
7937
7309
 
7938
- Examples:
7939
-
7310
+ Examples
7940
7311
  >>> from meilisearch_async_client import Client
7941
7312
  >>> client = Client("http://localhost.com", "masterKey")
7942
7313
  >>> index = client.index("movies")
@@ -7952,21 +7323,17 @@ class Index(_BaseIndex):
7952
7323
  """Update the separator tokens settings for an index.
7953
7324
 
7954
7325
  Args:
7955
-
7956
7326
  separator_tokens: List of separator tokens.
7957
7327
  compress: If set to True the data will be sent in gzip format. Defaults to False.
7958
7328
 
7959
7329
  Returns:
7960
-
7961
7330
  Task to track the action.
7962
7331
 
7963
7332
  Raises:
7964
-
7965
7333
  MeilisearchCommunicationError: If there was an error communicating with the server.
7966
7334
  MeilisearchApiError: If the Meilisearch API returned an error.
7967
7335
 
7968
- Examples:
7969
-
7336
+ Examples
7970
7337
  >>> from meilisearch_python_sdk import Client
7971
7338
  >>> client = Client("http://localhost.com", "masterKey")
7972
7339
  >>> index = client.index("movies")
@@ -7982,16 +7349,13 @@ class Index(_BaseIndex):
7982
7349
  """Reset an index's separator tokens settings to the default value.
7983
7350
 
7984
7351
  Returns:
7985
-
7986
7352
  The details of the task status.
7987
7353
 
7988
7354
  Raises:
7989
-
7990
7355
  MeilisearchCommunicationError: If there was an error communicating with the server.
7991
7356
  MeilisearchApiError: If the Meilisearch API returned an error.
7992
7357
 
7993
- Examples:
7994
-
7358
+ Examples
7995
7359
  >>> from meilisearch_async_client import Client
7996
7360
  >>> client = Client("http://localhost.com", "masterKey")
7997
7361
  >>> index = client.index("movies")
@@ -8005,16 +7369,13 @@ class Index(_BaseIndex):
8005
7369
  """Get non-separator token settings for the index.
8006
7370
 
8007
7371
  Returns:
8008
-
8009
7372
  Non-separator tokens for the index.
8010
7373
 
8011
7374
  Raises:
8012
-
8013
7375
  MeilisearchCommunicationError: If there was an error communicating with the server.
8014
7376
  MeilisearchApiError: If the Meilisearch API returned an error.
8015
7377
 
8016
- Examples:
8017
-
7378
+ Examples
8018
7379
  >>> from meilisearch_async_client import Client
8019
7380
  >>> client = Client("http://localhost.com", "masterKey")
8020
7381
  >>> index = client.index("movies")
@@ -8030,21 +7391,17 @@ class Index(_BaseIndex):
8030
7391
  """Update the non-separator tokens settings for an index.
8031
7392
 
8032
7393
  Args:
8033
-
8034
7394
  non_separator_tokens: List of non-separator tokens.
8035
7395
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8036
7396
 
8037
7397
  Returns:
8038
-
8039
7398
  Task to track the action.
8040
7399
 
8041
7400
  Raises:
8042
-
8043
7401
  MeilisearchCommunicationError: If there was an error communicating with the server.
8044
7402
  MeilisearchApiError: If the Meilisearch API returned an error.
8045
7403
 
8046
- Examples:
8047
-
7404
+ Examples
8048
7405
  >>> from meilisearch_python_sdk import Client
8049
7406
  >>> client = Client("http://localhost.com", "masterKey")
8050
7407
  >>> index = client.index("movies")
@@ -8060,16 +7417,13 @@ class Index(_BaseIndex):
8060
7417
  """Reset an index's non-separator tokens settings to the default value.
8061
7418
 
8062
7419
  Returns:
8063
-
8064
7420
  The details of the task status.
8065
7421
 
8066
7422
  Raises:
8067
-
8068
7423
  MeilisearchCommunicationError: If there was an error communicating with the server.
8069
7424
  MeilisearchApiError: If the Meilisearch API returned an error.
8070
7425
 
8071
- Examples:
8072
-
7426
+ Examples
8073
7427
  >>> from meilisearch_async_client import Client
8074
7428
  >>> client = Client("http://localhost.com", "masterKey")
8075
7429
  >>> index = client.index("movies")
@@ -8083,16 +7437,13 @@ class Index(_BaseIndex):
8083
7437
  """Get search cutoff time in ms.
8084
7438
 
8085
7439
  Returns:
8086
-
8087
7440
  Integer representing the search cutoff time in ms, or None.
8088
7441
 
8089
7442
  Raises:
8090
-
8091
7443
  MeilisearchCommunicationError: If there was an error communicating with the server.
8092
7444
  MeilisearchApiError: If the Meilisearch API returned an error.
8093
7445
 
8094
- Examples:
8095
-
7446
+ Examples
8096
7447
  >>> from meilisearch_async_client import Client
8097
7448
  >>> client = Client("http://localhost.com", "masterKey")
8098
7449
  >>> index = client.index("movies")
@@ -8106,21 +7457,17 @@ class Index(_BaseIndex):
8106
7457
  """Update the search cutoff for an index.
8107
7458
 
8108
7459
  Args:
8109
-
8110
7460
  search_cutoff_ms: Integer value of the search cutoff time in ms.
8111
7461
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8112
7462
 
8113
7463
  Returns:
8114
-
8115
7464
  Task to track the action.
8116
7465
 
8117
7466
  Raises:
8118
-
8119
7467
  MeilisearchCommunicationError: If there was an error communicating with the server.
8120
7468
  MeilisearchApiError: If the Meilisearch API returned an error.
8121
7469
 
8122
- Examples:
8123
-
7470
+ Examples
8124
7471
  >>> from meilisearch_python_sdk import Client
8125
7472
  >>> client = Client("http://localhost.com", "masterKey")
8126
7473
  >>> index = client.index("movies")
@@ -8136,16 +7483,13 @@ class Index(_BaseIndex):
8136
7483
  """Reset the search cutoff time to the default value.
8137
7484
 
8138
7485
  Returns:
8139
-
8140
7486
  The details of the task status.
8141
7487
 
8142
7488
  Raises:
8143
-
8144
7489
  MeilisearchCommunicationError: If there was an error communicating with the server.
8145
7490
  MeilisearchApiError: If the Meilisearch API returned an error.
8146
7491
 
8147
- Examples:
8148
-
7492
+ Examples
8149
7493
  >>> from meilisearch_async_client import Client
8150
7494
  >>> client = Client("http://localhost.com", "masterKey")
8151
7495
  >>> index = client.index("movies")
@@ -8159,16 +7503,13 @@ class Index(_BaseIndex):
8159
7503
  """Get word dictionary settings for the index.
8160
7504
 
8161
7505
  Returns:
8162
-
8163
7506
  Word dictionary for the index.
8164
7507
 
8165
7508
  Raises:
8166
-
8167
7509
  MeilisearchCommunicationError: If there was an error communicating with the server.
8168
7510
  MeilisearchApiError: If the Meilisearch API returned an error.
8169
7511
 
8170
- Examples:
8171
-
7512
+ Examples
8172
7513
  >>> from meilisearch_async_client import Client
8173
7514
  >>> client = Client("http://localhost.com", "masterKey")
8174
7515
  >>> index = client.index("movies")
@@ -8182,21 +7523,17 @@ class Index(_BaseIndex):
8182
7523
  """Update the word dictionary settings for an index.
8183
7524
 
8184
7525
  Args:
8185
-
8186
7526
  dictionary: List of dictionary values.
8187
7527
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8188
7528
 
8189
7529
  Returns:
8190
-
8191
7530
  Task to track the action.
8192
7531
 
8193
7532
  Raises:
8194
-
8195
7533
  MeilisearchCommunicationError: If there was an error communicating with the server.
8196
7534
  MeilisearchApiError: If the Meilisearch API returned an error.
8197
7535
 
8198
- Examples:
8199
-
7536
+ Examples
8200
7537
  >>> from meilisearch_python_sdk import Client
8201
7538
  >>> client = Client("http://localhost.com", "masterKey")
8202
7539
  >>> index = client.index("movies")
@@ -8212,16 +7549,13 @@ class Index(_BaseIndex):
8212
7549
  """Reset an index's word dictionary settings to the default value.
8213
7550
 
8214
7551
  Returns:
8215
-
8216
7552
  The details of the task status.
8217
7553
 
8218
7554
  Raises:
8219
-
8220
7555
  MeilisearchCommunicationError: If there was an error communicating with the server.
8221
7556
  MeilisearchApiError: If the Meilisearch API returned an error.
8222
7557
 
8223
- Examples:
8224
-
7558
+ Examples
8225
7559
  >>> from meilisearch_async_client import Client
8226
7560
  >>> client = Client("http://localhost.com", "masterKey")
8227
7561
  >>> index = client.index("movies")
@@ -8235,16 +7569,13 @@ class Index(_BaseIndex):
8235
7569
  """Get proximity precision settings for the index.
8236
7570
 
8237
7571
  Returns:
8238
-
8239
7572
  Proximity precision for the index.
8240
7573
 
8241
7574
  Raises:
8242
-
8243
7575
  MeilisearchCommunicationError: If there was an error communicating with the server.
8244
7576
  MeilisearchApiError: If the Meilisearch API returned an error.
8245
7577
 
8246
- Examples:
8247
-
7578
+ Examples
8248
7579
  >>> from meilisearch_async_client import Client
8249
7580
  >>> client = Client("http://localhost.com", "masterKey")
8250
7581
  >>> index = client.index("movies")
@@ -8260,21 +7591,17 @@ class Index(_BaseIndex):
8260
7591
  """Update the proximity precision settings for an index.
8261
7592
 
8262
7593
  Args:
8263
-
8264
7594
  proximity_precision: The proximity precision value.
8265
7595
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8266
7596
 
8267
7597
  Returns:
8268
-
8269
7598
  Task to track the action.
8270
7599
 
8271
7600
  Raises:
8272
-
8273
7601
  MeilisearchCommunicationError: If there was an error communicating with the server.
8274
7602
  MeilisearchApiError: If the Meilisearch API returned an error.
8275
7603
 
8276
- Examples:
8277
-
7604
+ Examples
8278
7605
  >>> from meilisearch_python_sdk import Client
8279
7606
  >>> from meilisearch_python_sdk.models.settings import ProximityPrecision
8280
7607
  >>> client = Client("http://localhost.com", "masterKey")
@@ -8293,16 +7620,13 @@ class Index(_BaseIndex):
8293
7620
  """Reset an index's proximity precision settings to the default value.
8294
7621
 
8295
7622
  Returns:
8296
-
8297
7623
  The details of the task status.
8298
7624
 
8299
7625
  Raises:
8300
-
8301
7626
  MeilisearchCommunicationError: If there was an error communicating with the server.
8302
7627
  MeilisearchApiError: If the Meilisearch API returned an error.
8303
7628
 
8304
- Examples:
8305
-
7629
+ Examples
8306
7630
  >>> from meilisearch_async_client import Client
8307
7631
  >>> client = Client("http://localhost.com", "masterKey")
8308
7632
  >>> index = client.index("movies")
@@ -8316,16 +7640,13 @@ class Index(_BaseIndex):
8316
7640
  """Get embedder settings for the index.
8317
7641
 
8318
7642
  Returns:
8319
-
8320
7643
  Embedders for the index.
8321
7644
 
8322
7645
  Raises:
8323
-
8324
7646
  MeilisearchCommunicationError: If there was an error communicating with the server.
8325
7647
  MeilisearchApiError: If the Meilisearch API returned an error.
8326
7648
 
8327
- Examples:
8328
-
7649
+ Examples
8329
7650
  >>> from meilisearch_async_client import Client
8330
7651
  >>> client = Client("http://localhost.com", "masterKey")
8331
7652
  >>> index = client.index("movies")
@@ -8339,21 +7660,17 @@ class Index(_BaseIndex):
8339
7660
  """Update the embedders settings for an index.
8340
7661
 
8341
7662
  Args:
8342
-
8343
7663
  embedders: The embedders value.
8344
7664
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8345
7665
 
8346
7666
  Returns:
8347
-
8348
7667
  Task to track the action.
8349
7668
 
8350
7669
  Raises:
8351
-
8352
7670
  MeilisearchCommunicationError: If there was an error communicating with the server.
8353
7671
  MeilisearchApiError: If the Meilisearch API returned an error.
8354
7672
 
8355
- Examples:
8356
-
7673
+ Examples
8357
7674
  >>> from meilisearch_python_sdk import Client
8358
7675
  >>> from meilisearch_python_sdk.models.settings import Embedders, UserProvidedEmbedder
8359
7676
  >>> client = Client("http://localhost.com", "masterKey")
@@ -8365,7 +7682,9 @@ class Index(_BaseIndex):
8365
7682
  payload = {}
8366
7683
  for key, embedder in embedders.embedders.items():
8367
7684
  payload[key] = {
8368
- k: v for k, v in embedder.model_dump(by_alias=True).items() if v is not None
7685
+ k: v
7686
+ for k, v in embedder.model_dump(by_alias=True, exclude_none=True).items()
7687
+ if v is not None
8369
7688
  }
8370
7689
 
8371
7690
  response = self._http_requests.patch(
@@ -8379,16 +7698,13 @@ class Index(_BaseIndex):
8379
7698
  """Reset an index's embedders settings to the default value.
8380
7699
 
8381
7700
  Returns:
8382
-
8383
7701
  The details of the task status.
8384
7702
 
8385
7703
  Raises:
8386
-
8387
7704
  MeilisearchCommunicationError: If there was an error communicating with the server.
8388
7705
  MeilisearchApiError: If the Meilisearch API returned an error.
8389
7706
 
8390
- Examples:
8391
-
7707
+ Examples
8392
7708
  >>> from meilisearch_async_client import Client
8393
7709
  >>> client = AsyncClient("http://localhost.com", "masterKey")
8394
7710
  >>> index = client.index("movies")
@@ -8402,16 +7718,13 @@ class Index(_BaseIndex):
8402
7718
  """Get localized attributes settings for the index.
8403
7719
 
8404
7720
  Returns:
8405
-
8406
7721
  Localized attributes for the index.
8407
7722
 
8408
7723
  Raises:
8409
-
8410
7724
  MeilisearchCommunicationError: If there was an error communicating with the server.
8411
7725
  MeilisearchApiError: If the Meilisearch API returned an error.
8412
7726
 
8413
- Examples:
8414
-
7727
+ Examples
8415
7728
  >>> from meilisearch_async_client import AsyncClient
8416
7729
  >>> client = Client("http://localhost.com", "masterKey")
8417
7730
  >>> index = client.index("movies")
@@ -8430,21 +7743,17 @@ class Index(_BaseIndex):
8430
7743
  """Update the localized attributes settings for an index.
8431
7744
 
8432
7745
  Args:
8433
-
8434
7746
  localized_attributes: The localized attributes value.
8435
7747
  compress: If set to True the data will be sent in gzip format. Defaults to False.
8436
7748
 
8437
7749
  Returns:
8438
-
8439
7750
  Task to track the action.
8440
7751
 
8441
7752
  Raises:
8442
-
8443
7753
  MeilisearchCommunicationError: If there was an error communicating with the server.
8444
7754
  MeilisearchApiError: If the Meilisearch API returned an error.
8445
7755
 
8446
- Examples:
8447
-
7756
+ Examples
8448
7757
  >>> from meilisearch_python_sdk import AsyncClient
8449
7758
  >>> from meilisearch_python_sdk.models.settings import LocalizedAttributes
8450
7759
  >>>
@@ -8467,16 +7776,13 @@ class Index(_BaseIndex):
8467
7776
  """Reset an index's localized attributes settings to the default value.
8468
7777
 
8469
7778
  Returns:
8470
-
8471
7779
  The details of the task status.
8472
7780
 
8473
7781
  Raises:
8474
-
8475
7782
  MeilisearchCommunicationError: If there was an error communicating with the server.
8476
7783
  MeilisearchApiError: If the Meilisearch API returned an error.
8477
7784
 
8478
- Examples:
8479
-
7785
+ Examples
8480
7786
  >>> from meilisearch_async_client import AsyncClient
8481
7787
  >>> Client("http://localhost.com", "masterKey") as client:
8482
7788
  >>> index = client.index("movies")