You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the `updateId`, you can check the status (`enqueued`, `processing`, `processed` or `failed`) of your documents addition using the [update endpoint](https://docs.meilisearch.com/reference/api/updates.html#get-an-update-status).
93
+
With the `updateId`, you can check the status (`enqueued`, `processing`, `succeeded` or `failed`) of your documents addition using the [update endpoint](https://docs.meilisearch.com/reference/api/updates.html#get-an-update-status).
# Returns True if an index was deleted or False if not
65
+
66
+
# Raises
67
+
# ------
68
+
# MeiliSearchApiError
69
+
# An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
"""Get an index, or create it if it doesn't exist.
182
-
183
-
Parameters
184
-
----------
185
-
uid:
186
-
UID of the index
187
-
options (optional): dict
188
-
Options passed during index creation (ex: primaryKey)
189
-
190
-
Returns
191
-
-------
192
-
index:
193
-
An instance of Index containing the information of the retrieved or newly created index.
194
-
195
-
Raises
196
-
------
197
-
MeiliSearchApiError
198
-
An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
# """Get an index, or create it if it doesn't exist.
204
+
205
+
# Parameters
206
+
# ----------
207
+
# uid:
208
+
# UID of the index
209
+
# options (optional): dict
210
+
# Options passed during index creation (ex: primaryKey)
211
+
212
+
# Returns
213
+
# -------
214
+
# index:
215
+
# An instance of Index containing the information of the retrieved or newly created index.
216
+
217
+
# Raises
218
+
# ------
219
+
# MeiliSearchApiError
220
+
# An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
List of all enqueued, processing, succeeded or failed actions of the index.
366
+
367
+
Raises
368
+
------
369
+
MeiliSearchApiError
370
+
An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
371
+
"""
372
+
returnself.http.get(
373
+
f'{self.config.paths.task}'
374
+
)
375
+
376
+
defget_task(self, uid: int) ->Dict[str, Any]:
377
+
"""Get one task.
378
+
379
+
Parameters
380
+
----------
381
+
uid:
382
+
identifier of the task to retrieve
383
+
384
+
Returns
385
+
-------
386
+
task:
387
+
Dictionary containing a task to track the informations about the progress of an asynchronous process.
388
+
389
+
Raises
390
+
------
391
+
MeiliSearchApiError
392
+
An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
393
+
"""
394
+
returnself.http.get(
395
+
f'{self.config.paths.task}/{uid}'
396
+
)
397
+
398
+
defwait_for_task(
399
+
self, uid: int,
400
+
timeout_in_ms: int=5000,
401
+
interval_in_ms: int=50,
402
+
) ->Dict[str, Any]:
403
+
"""Wait until MeiliSearch processes an task, and get its status.
404
+
405
+
Parameters
406
+
----------
407
+
uid:
408
+
identifier of the task to retrieve
409
+
timeout_in_ms (optional):
410
+
time the method should wait before raising a MeiliSearchTimeoutError
411
+
interval_in_ms (optional):
412
+
time interval the method should wait (sleep) between requests
413
+
414
+
Returns
415
+
-------
416
+
task:
417
+
Dictionary containing a task to track the informations about the progress of an asynchronous process.
418
+
419
+
Raises
420
+
------
421
+
MeiliSearchTimeoutError
422
+
An error containing details about why MeiliSearch can't process your request. MeiliSearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
0 commit comments