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
Copy file name to clipboardExpand all lines: reference/api/batches.mdx
+17-23Lines changed: 17 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Tasks — Meilisearch API reference
3
-
description: The /tasks route allows you to manage and monitor Meilisearch's asynchronous operations.
2
+
title: Batches — Meilisearch API reference
3
+
description: The /batches route allows you to monitor how Meilisearch is grouping and processing asynchronous operations.
4
4
---
5
5
6
6
# Batches
@@ -32,7 +32,7 @@ The `/batches` route gives information about the progress of batches of [asynchr
32
32
"startedAt": "2024-12-10T15:20:30.18182Z",
33
33
"finishedAt": "2024-12-10T15:20:30.432338Z",
34
34
"progress": {
35
-
"steps": [
35
+
"currentStep": [
36
36
{
37
37
"name": "extracting words",
38
38
"finished": 2,
@@ -62,21 +62,21 @@ The `/batches` route gives information about the progress of batches of [asynchr
62
62
### `progress`
63
63
64
64
**Type**: Object<br />
65
-
**Description**: Object containing two fields: `steps` and `percentage`. Once Meilisearch has fully processed a batch, its `progress` is set to `null`.
65
+
**Description**: Object containing two fields: `currentStep` and `percentage`. Once Meilisearch has fully processed a batch, its `progress` is set to `null`.
66
66
67
67
#### `currentStep`
68
68
69
-
Information about the current operations Meilisearch is performing in this batch. Every step consists of multiple operations. A step may also generate substeps.
69
+
Information about the current operations Meilisearch is performing in this batch. A step may consist of multiple substeps.
|**`total`**| The total number of operations in the step|
75
75
|**`finished`**| The number of operations Meilisearch has completed |
76
76
77
77
#### `percentage`
78
78
79
-
The progress of the current set of operations, calculated from all operations across all current steps.
79
+
The progress of the current set of operations, calculated from all current steps and substeps.
80
80
81
81
### `stats`
82
82
@@ -89,13 +89,7 @@ Number of tasks in the batch.
89
89
90
90
#### `status`
91
91
92
-
Object listing the status of each task in the batch. Contains five keys whose values correspond to the number of tasks with that status:
93
-
94
-
-`succeeded`
95
-
-`failed`
96
-
-`canceled`
97
-
-`processing`
98
-
-`enqueued`
92
+
Object listing the [status of each task](/reference/api/tasks#status) in the batch. Contains five keys whose values correspond to the number of tasks with that status.
99
93
100
94
#### `types`
101
95
@@ -131,9 +125,9 @@ Batches are always returned in descending order of `uid`. This means that by def
131
125
Batch results are [paginated](/learn/async/paginating_tasks) and can be [filtered](/learn/async/filtering_tasks) with query parameters.
132
126
133
127
<Capsuleintent="danger"title="`/batches` parameters and tasks">
134
-
Some query parameters for `/batches`, such as `uids` and `statuses`, filter results based on the tasks, not the batches themselves.
128
+
Some query parameters for `/batches`, such as `uids` and `statuses`, target tasks instead of batches.
135
129
136
-
For example, `?uids=0` returns batches containing the task with a `taskUid` equal to `0`, instead of a batch with a `batchUid` equal to `0`.
130
+
For example, `?uids=0` returns a batch containing the task with a `taskUid` equal to `0`, instead of a batch with a `batchUid` equal to `0`.
137
131
</Capsule>
138
132
139
133
### Query parameters
@@ -142,18 +136,18 @@ For example, `?uids=0` returns batches containing the task with a `taskUid` equa
|**`uids`**|`*` (all task uids) | Select batches containing the tasks with the specified `uid`s. Separate multiple task `uids` with a comma (`,`) |
144
138
|**`batchUids`**|`*` (all batch uids) | Filter batches by their `uid`. Separate multiple batch `uids` with a comma (`,`) |
145
-
|**`limit`**|`20`| Number of batches to return |
146
-
|**`from`**|`uid` of the last created batch |`uid` of the first batch returned |
139
+
|**`indexUids`**|`*` (all indexes) | Select batches containing tasks affecting the specified indexes. Separate multiple `indexUids` with a comma (`,`) |
147
140
|**`statuses`**|`*` (all statuses) | Select batches containing tasks with the specified `status`. Separate multiple task `statuses` with a comma (`,`) |
148
141
|**`types`**|`*` (all types) | Select batches containing tasks with the specified `type`. Separate multiple task `types` with a comma (`,`) |
149
-
|**`indexUids`**|`*` (all indexes) | Select batches containing tasks affecting the specified indexes. Separate multiple `indexUids` with a comma (`,`) |
142
+
|**`limit`**|`20`| Number of batches to return |
143
+
|**`from`**|`uid` of the last created batch |`uid` of the first batch returned |
144
+
|**`reverse`**|`false`| If `true`, returns results in the reverse order, from oldest to most recent |
150
145
|**`beforeEnqueuedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `enqueuedAt` field |
151
146
|**`beforeStartedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `startedAt` field |
152
147
|**`beforeFinishedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `finishedAt` field |
153
148
|**`afterEnqueuedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `enqueuedAt` field |
154
149
|**`afterStartedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `startedAt` field |
155
150
|**`afterFinishedAt`**|`*` (all tasks) | Select batches containing tasks with the specified `finishedAt` field |
156
-
|**`reverse`**|`false`| If `true`, returns results in the reverse order, from oldest to most recent |
0 commit comments