mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
add error codes and tests
This commit is contained in:
parent
441641397b
commit
ed3dfbe729
5 changed files with 195 additions and 5 deletions
|
@ -140,6 +140,11 @@ impl Index<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
pub async fn get_document_by_filter(&self, payload: Value) -> (Value, StatusCode) {
|
||||
let url = format!("/indexes/{}/documents/fetch", urlencode(self.uid.as_ref()));
|
||||
self.service.post(url, payload).await
|
||||
}
|
||||
|
||||
pub async fn wait_task(&self, update_id: u64) -> Value {
|
||||
// try several times to get status, or panic to not wait forever
|
||||
let url = format!("/tasks/{}", update_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue