mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
restore document deletion routes
This commit is contained in:
parent
c32012c44a
commit
b9d189bf12
5 changed files with 68 additions and 75 deletions
|
@ -95,6 +95,8 @@ pub struct Stats {
|
|||
#[derive(derivative::Derivative)]
|
||||
#[derivative(Debug)]
|
||||
pub enum Update {
|
||||
DeleteDocuments(Vec<String>),
|
||||
ClearDocuments,
|
||||
Settings(Settings<Unchecked>),
|
||||
DocumentAddition {
|
||||
#[derivative(Debug="ignore")]
|
||||
|
|
|
@ -49,12 +49,14 @@ pub fn create_update_handler(
|
|||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum RegisterUpdate {
|
||||
DeleteDocuments(Vec<String>),
|
||||
DocumentAddition {
|
||||
primary_key: Option<String>,
|
||||
method: IndexDocumentsMethod,
|
||||
content_uuid: Uuid,
|
||||
},
|
||||
Settings(Settings<Unchecked>),
|
||||
ClearDocuments,
|
||||
}
|
||||
|
||||
/// A wrapper type to implement read on a `Stream<Result<Bytes, Error>>`.
|
||||
|
@ -210,6 +212,8 @@ impl UpdateLoop {
|
|||
}
|
||||
}
|
||||
Update::Settings(settings) => RegisterUpdate::Settings(settings),
|
||||
Update::ClearDocuments => RegisterUpdate::ClearDocuments,
|
||||
Update::DeleteDocuments(ids) => RegisterUpdate::DeleteDocuments(ids),
|
||||
};
|
||||
|
||||
let store = self.store.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue