Meilisearch uses a task queue to handle asynchronous operations. This in-depth guide explains tasks, their uses, and how to manage them using Meilisearch’s API.
task
object.
taskUid
to track the progress of a task.
status
status
. This field has one of the following possible values:
enqueued
: the task has been received and will be processed soonprocessing
: the task is being processedsucceeded
: the task has been successfully processedfailed
: a failure occurred when processing the task. No changes were made to the databasecanceled
: the task was canceledsucceeded
, failed
, and canceled
tasks are finished tasks. Meilisearch keeps them in the task database but has finished processing these tasks. It is possible to configure a webhook to notify external services when a task is finished.
enqueued
and processing
tasks are unfinished tasks. Meilisearch is either processing them or will do so in the future.
null
for the indexUid
field.
Meilisearch considers the following task types as global:
"indexes": [*]
) to view global tasks.no_space_left_on_device
error. Users will need to delete tasks using the delete tasks endpoint to continue write operations.taskCancelation
taskDeletion
snapshotCreation
dumpCreation
task
object. Task status
set to enqueued
status
set to processing
succeeded
if task was successfully processed, or failed
if there was an error/batches
route to obtain more information on batches and how they are processing your tasks.
enqueued
or processing
by using the cancel tasks endpoint. Doing so changes a task’s status
to canceled
.
processing
tasks and resets them to enqueued
. Task handling proceeds as normal once the instance is relaunched.taskUid
in response.
When you query the get task endpoint using this value, you see that it has been enqueued
:
status
changed to succeeded
:
error
object:
enqueued
or processing
, it would have the canceled
status and a non-null
value for the canceledBy
field.
After a task has been deleted, trying to access it returns a task_not_found
error.