mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
change ranking rule addition behavior
This commit is contained in:
parent
ce28567dda
commit
6167a10e5e
@ -46,12 +46,6 @@ pub fn apply_settings_update(
|
|||||||
UpdateState::Update(v) => {
|
UpdateState::Update(v) => {
|
||||||
let ranked_field: Vec<&str> = v.iter().filter_map(RankingRule::field).collect();
|
let ranked_field: Vec<&str> = v.iter().filter_map(RankingRule::field).collect();
|
||||||
schema.update_ranked(&ranked_field)?;
|
schema.update_ranked(&ranked_field)?;
|
||||||
for name in ranked_field {
|
|
||||||
if schema.accept_new_fields() {
|
|
||||||
schema.set_indexed(name.as_ref())?;
|
|
||||||
schema.set_displayed(name.as_ref())?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
index.main.put_ranking_rules(writer, &v)?;
|
index.main.put_ranking_rules(writer, &v)?;
|
||||||
must_reindex = true;
|
must_reindex = true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user