mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Rename Update/Type SchemaUpdate into Schema
This commit is contained in:
parent
97de72de83
commit
da6ab2753e
@ -22,7 +22,7 @@ use meilidb_schema::Schema;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum Update {
|
||||
SchemaUpdate(Schema),
|
||||
Schema(Schema),
|
||||
DocumentsAddition(Vec<rmpv::Value>),
|
||||
DocumentsDeletion(Vec<DocumentId>),
|
||||
SynonymsAddition(BTreeMap<String, Vec<String>>),
|
||||
@ -31,7 +31,7 @@ pub enum Update {
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum UpdateType {
|
||||
SchemaUpdate { schema: Schema },
|
||||
Schema { schema: Schema },
|
||||
DocumentsAddition { number: usize },
|
||||
DocumentsDeletion { number: usize },
|
||||
SynonymsAddition { number: usize },
|
||||
@ -104,10 +104,10 @@ pub fn update_task(writer: &mut rkv::Writer, index: store::Index) -> MResult<Opt
|
||||
debug!("Processing update number {}", update_id);
|
||||
|
||||
let (update_type, result, duration) = match update {
|
||||
Update::SchemaUpdate(schema) => {
|
||||
Update::Schema(schema) => {
|
||||
let start = Instant::now();
|
||||
|
||||
let update_type = UpdateType::SchemaUpdate { schema: schema.clone() };
|
||||
let update_type = UpdateType::Schema { schema: schema.clone() };
|
||||
let result = apply_schema_update(writer, index.main, &schema);
|
||||
|
||||
(update_type, result, start.elapsed())
|
||||
|
@ -24,7 +24,7 @@ pub fn push_schema_update(
|
||||
{
|
||||
let last_update_id = next_update_id(writer, updates_store, updates_results_store)?;
|
||||
|
||||
let update = Update::SchemaUpdate(schema);
|
||||
let update = Update::Schema(schema);
|
||||
updates_store.put_update(writer, last_update_id, &update)?;
|
||||
|
||||
Ok(last_update_id)
|
||||
|
Loading…
Reference in New Issue
Block a user