mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
update settings
This commit is contained in:
parent
8432c8584a
commit
47138c7632
2 changed files with 12 additions and 8 deletions
|
@ -114,8 +114,14 @@ impl IndexController {
|
|||
todo!()
|
||||
}
|
||||
|
||||
fn update_settings(&self, index_uid: String, settings: Settings) -> anyhow::Result<UpdateStatus> {
|
||||
todo!()
|
||||
pub async fn update_settings(&self, index_uid: String, settings: Settings) -> anyhow::Result<UpdateStatus> {
|
||||
let uuid = self.uuid_resolver.get_or_create(index_uid).await?;
|
||||
let meta = UpdateMeta::Settings(settings);
|
||||
// Nothing so send, drop the sender right away, as not to block the update actor.
|
||||
let (_, receiver) = mpsc::channel(1);
|
||||
|
||||
let status = self.update_handle.update(meta, receiver, uuid).await?;
|
||||
Ok(status)
|
||||
}
|
||||
|
||||
pub async fn create_index(&self, index_settings: IndexSettings) -> anyhow::Result<IndexMetadata> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue