change the way settings are show in updates

This commit is contained in:
qdequele 2020-01-22 17:48:09 +01:00
parent b33dac9faa
commit 9c0497c419
No known key found for this signature in database
GPG Key ID: B3F0A000EBF11745
2 changed files with 7 additions and 4 deletions

View File

@ -102,7 +102,9 @@ impl UpdateData {
UpdateData::DocumentsDeletion(deletion) => UpdateType::DocumentsDeletion { UpdateData::DocumentsDeletion(deletion) => UpdateType::DocumentsDeletion {
number: deletion.len(), number: deletion.len(),
}, },
UpdateData::Settings(update) => UpdateType::Settings(update.clone()), UpdateData::Settings(update) => UpdateType::Settings {
settings: update.clone(),
},
} }
} }
} }
@ -115,7 +117,7 @@ pub enum UpdateType {
DocumentsAddition { number: usize }, DocumentsAddition { number: usize },
DocumentsPartial { number: usize }, DocumentsPartial { number: usize },
DocumentsDeletion { number: usize }, DocumentsDeletion { number: usize },
Settings(SettingsUpdate), Settings { settings: SettingsUpdate },
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
@ -264,7 +266,9 @@ pub fn update_task<'a, 'b>(
UpdateData::Settings(settings) => { UpdateData::Settings(settings) => {
let start = Instant::now(); let start = Instant::now();
let update_type = UpdateType::Settings(settings.clone()); let update_type = UpdateType::Settings {
settings: settings.clone(),
};
let result = apply_settings_update( let result = apply_settings_update(
writer, writer,

View File

@ -116,7 +116,6 @@ pub fn apply_settings_update(
must_reindex = true; must_reindex = true;
}, },
_ => { _ => {
println!("schema: {:?}", schema);
index.main.put_schema(writer, &schema)?; index.main.put_schema(writer, &schema)?;
}, },
}; };