mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
move identifier from settings to index; fix #470
This commit is contained in:
parent
dc9ca2ebc9
commit
4986adc186
8 changed files with 193 additions and 69 deletions
|
@ -89,7 +89,7 @@ pub fn apply_settings_update(
|
|||
must_reindex = true;
|
||||
},
|
||||
UpdateState::Nothing => (),
|
||||
};
|
||||
}
|
||||
match settings.displayed_attributes.clone() {
|
||||
UpdateState::Update(v) => schema.update_displayed(v)?,
|
||||
UpdateState::Clear => {
|
||||
|
@ -97,11 +97,6 @@ pub fn apply_settings_update(
|
|||
schema.update_displayed(clear)?;
|
||||
},
|
||||
UpdateState::Nothing => (),
|
||||
};
|
||||
|
||||
if let UpdateState::Update(v) = settings.identifier.clone() {
|
||||
schema.set_identifier(v.as_ref())?;
|
||||
must_reindex = true;
|
||||
}
|
||||
|
||||
index.main.put_schema(writer, &schema)?;
|
||||
|
@ -130,9 +125,6 @@ pub fn apply_settings_update(
|
|||
reindex_all_documents(writer, index)?;
|
||||
}
|
||||
|
||||
if let UpdateState::Clear = settings.identifier {
|
||||
index.main.delete_schema(writer)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue