mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
implement clear documents
This commit is contained in:
parent
ae5581d37c
commit
a955e04ab6
3 changed files with 18 additions and 17 deletions
|
@ -106,8 +106,12 @@ impl IndexController {
|
|||
Ok(status)
|
||||
}
|
||||
|
||||
fn clear_documents(&self, index: String) -> anyhow::Result<UpdateStatus> {
|
||||
todo!()
|
||||
pub async fn clear_documents(&self, index: String) -> anyhow::Result<UpdateStatus> {
|
||||
let uuid = self.uuid_resolver.resolve(index).await.unwrap().unwrap();
|
||||
let meta = UpdateMeta::ClearDocuments;
|
||||
let (_, receiver) = mpsc::channel(1);
|
||||
let status = self.update_handle.update(meta, receiver, uuid).await?;
|
||||
Ok(status)
|
||||
}
|
||||
|
||||
pub async fn delete_documents(&self, index: String, document_ids: Vec<String>) -> anyhow::Result<UpdateStatus> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue