mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Fix export when index already exists
This commit is contained in:
parent
37a692f942
commit
b7bebe9bbb
1 changed files with 6 additions and 2 deletions
|
@ -72,8 +72,12 @@ impl IndexScheduler {
|
||||||
}
|
}
|
||||||
|
|
||||||
request.send_bytes(Default::default()).map_err(into_backoff_error)
|
request.send_bytes(Default::default()).map_err(into_backoff_error)
|
||||||
})?;
|
});
|
||||||
let index_exists = response.status() == 200;
|
let index_exists = match response {
|
||||||
|
Ok(response) => response.status() == 200,
|
||||||
|
Err(Error::FromRemoteWhenExporting { code, .. }) if code == "index_not_found" => false,
|
||||||
|
Err(e) => return Err(e),
|
||||||
|
};
|
||||||
|
|
||||||
let primary_key = index
|
let primary_key = index
|
||||||
.primary_key(&index_rtxn)
|
.primary_key(&index_rtxn)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue