mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
ranking fields should be stored and indexed by default; fix #521
This commit is contained in:
parent
cf6e481c14
commit
2d82f1b655
3 changed files with 58 additions and 2 deletions
|
@ -45,7 +45,13 @@ pub fn apply_settings_update(
|
|||
match settings.ranking_rules {
|
||||
UpdateState::Update(v) => {
|
||||
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)?;
|
||||
must_reindex = true;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue