implement clear all documents

This commit is contained in:
mpostma 2021-02-11 12:03:00 +01:00
parent fa7379e129
commit a8ba809656
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
5 changed files with 35 additions and 3 deletions

View file

@ -128,6 +128,9 @@ pub trait IndexController {
data: &[u8],
) -> anyhow::Result<UpdateStatus>;
/// Clear all documents in the given index.
fn clear_documents(&self, index: impl AsRef<str>) -> anyhow::Result<UpdateStatus>;
/// Updates an index settings. If the index does not exist, it will be created when the update
/// is applied to the index.
fn update_settings<S: AsRef<str>>(&self, index_uid: S, settings: Settings) -> anyhow::Result<UpdateStatus>;