mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
set new attributes indexed if needed
This commit is contained in:
committed by
qdequele
parent
b1528f9466
commit
585bba43a0
@ -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)?;
|
||||
|
Reference in New Issue
Block a user