mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
set new attributes indexed if needed
This commit is contained in:
parent
b1528f9466
commit
585bba43a0
10 changed files with 100 additions and 648 deletions
|
@ -57,6 +57,7 @@ pub fn apply_settings_update(
|
|||
},
|
||||
_ => (),
|
||||
}
|
||||
|
||||
match settings.ranking_distinct {
|
||||
UpdateState::Update(v) => {
|
||||
index.main.put_ranking_distinct(writer, v)?;
|
||||
|
@ -67,6 +68,16 @@ pub fn apply_settings_update(
|
|||
_ => (),
|
||||
}
|
||||
|
||||
match settings.index_new_fields {
|
||||
UpdateState::Update(v) => {
|
||||
schema.set_must_index_new_fields(v);
|
||||
},
|
||||
UpdateState::Clear => {
|
||||
schema.set_must_index_new_fields(true);
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
|
||||
match settings.attributes_searchable.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
schema.update_indexed(v)?;
|
||||
|
@ -109,6 +120,7 @@ pub fn apply_settings_update(
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
match settings.attribute_identifier.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
schema.set_identifier(v)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue