set new attributes indexed if needed

This commit is contained in:
Quentin de Quelen 2020-01-27 08:52:36 +01:00 committed by qdequele
parent b1528f9466
commit 585bba43a0
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
10 changed files with 100 additions and 648 deletions

View file

@ -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)?;