mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
setttings update
This commit is contained in:
parent
8183202868
commit
4119ae8655
@ -48,10 +48,13 @@ impl IndexController for LocalIndexController {
|
|||||||
|
|
||||||
fn update_settings<S: AsRef<str>>(
|
fn update_settings<S: AsRef<str>>(
|
||||||
&self,
|
&self,
|
||||||
_index_uid: S,
|
index: S,
|
||||||
_settings: super::Settings
|
settings: super::Settings
|
||||||
) -> anyhow::Result<UpdateStatus<UpdateMeta, UpdateResult, String>> {
|
) -> anyhow::Result<UpdateStatus<UpdateMeta, UpdateResult, String>> {
|
||||||
todo!()
|
let (_, update_store) = self.indexes.get_or_create_index(&index, self.update_db_size, self.index_db_size)?;
|
||||||
|
let meta = UpdateMeta::Settings(settings);
|
||||||
|
let pending = update_store.register_update(meta, &[]).unwrap();
|
||||||
|
Ok(pending.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_index<S: AsRef<str>>(&self, _index_uid: S) -> anyhow::Result<()> {
|
fn create_index<S: AsRef<str>>(&self, _index_uid: S) -> anyhow::Result<()> {
|
||||||
|
@ -188,8 +188,6 @@ impl HandleUpdate<UpdateMeta, UpdateResult, String> for UpdateHandler {
|
|||||||
) -> Result<Processed<UpdateMeta, UpdateResult>, Failed<UpdateMeta, String>> {
|
) -> Result<Processed<UpdateMeta, UpdateResult>, Failed<UpdateMeta, String>> {
|
||||||
use UpdateMeta::*;
|
use UpdateMeta::*;
|
||||||
|
|
||||||
println!("handling update {}", update_id);
|
|
||||||
|
|
||||||
let update_builder = self.update_buidler(update_id);
|
let update_builder = self.update_buidler(update_id);
|
||||||
|
|
||||||
let result = match meta.meta() {
|
let result = match meta.meta() {
|
||||||
@ -199,8 +197,6 @@ impl HandleUpdate<UpdateMeta, UpdateResult, String> for UpdateHandler {
|
|||||||
Facets(levels) => self.update_facets(levels, update_builder),
|
Facets(levels) => self.update_facets(levels, update_builder),
|
||||||
};
|
};
|
||||||
|
|
||||||
println!("{:?}", result);
|
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(result) => Ok(meta.process(result)),
|
Ok(result) => Ok(meta.process(result)),
|
||||||
Err(e) => Err(meta.fail(e.to_string())),
|
Err(e) => Err(meta.fail(e.to_string())),
|
||||||
|
Loading…
Reference in New Issue
Block a user