Updates
The updates
route gives information about the progress of the asynchronous processes.
Get an update status
GET
/indexes/:index_uid/updates/:updateId
Get the status of an update in a given index.
Path variables
Variable | Description |
---|---|
index_uid | The index UID |
updateId | The update identifier |
Example
<>
cURL
JS
Python
PHP
Java
Ruby
Go
Rust
Swift
Dart
curl \
-X GET 'http://localhost:7700/indexes/movies/updates/1'
client.index('movies').getUpdateStatus(1)
client.index('movies').get_update_status(1)
$client->index('movies')->getUpdateStatus(1);
client.index("movies").getUpdate(1).getStatus();
client.index('movies').get_update_status(1)
client.Index("movies").GetUpdateStatus(1)
// You can get the status of a `Progress` object:
let status: Status = progress.get_status().await.unwrap();
// Or you can use index to get an update status using its `update_id`:
let status: Status = index.get_update(1).await.unwrap();
client.index("movies").getUpdate(1) { (result: Result<Update.Result, Swift.Error>) in
switch result {
case .success(let update):
print(update)
case .failure(let error):
print(error)
}
}
await client.index('movies').getUpdateStatus(1);
Response: 200 Ok
Here is an example response representing an update that has already been processed.
{
"status": "processed",
"updateId": 1,
"type": {
"name": "DocumentsAddition",
"number": 4
},
"duration": 0.076980613,
"enqueuedAt": "2019-12-07T21:16:09.623944Z",
"processedAt": "2019-12-07T21:16:09.703509Z"
}
Get all update status
GET
/indexes/:index_uid/updates
Get the status of all updates in a given index.
Path variables
Variable | Description |
---|---|
index_uid | The index UID |
Example
<>
cURL
JS
Python
PHP
Java
Ruby
Go
Rust
Swift
Dart
curl \
-X GET 'http://localhost:7700/indexes/movies/updates'
client.index('movies').getAllUpdateStatus()
client.index('movies').get_all_update_status()
$client->index('movies')->getAllUpdateStatus();
for (UpdateStatus update: client.index("movies").getUpdates())
{
update.getStatus();
}
client.index('movies').get_all_update_status
client.Index("movies").GetAllUpdateStatus()
let status: Vec<ProgressStatus> = index.get_all_updates().await.unwrap();
client.index("movies").getAllUpdates() { (result: Result<[Update.Result], Swift.Error>) in
switch result {
case .success(let updates):
print(updates)
case .failure(let error):
print(error)
}
}
await client.index('movies').getAllUpdateStatus();
Response: 200 Ok
Here is an example response representing an enqueued update.
[
{
"status": "enqueued",
"updateId": 0,
"type": {
"name": "DocumentsAddition",
"number": 30
},
"enqueuedAt": "2021-02-14T14:07:09.364505700Z"
}
]
当前内容版权归 MeiliSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 MeiliSearch .