mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
requested changes
This commit is contained in:
parent
4b5437a882
commit
d114250ebb
4 changed files with 23 additions and 9 deletions
|
@ -70,7 +70,7 @@ pub fn apply_settings_update(
|
|||
|
||||
match settings.searchable_attributes.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
if v.len() == 1 && v[0] == "*" || v.is_empty() {
|
||||
if v.iter().any(|e| e == "*") || v.is_empty() {
|
||||
schema.set_all_fields_as_indexed();
|
||||
} else {
|
||||
schema.update_indexed(v)?;
|
||||
|
@ -85,15 +85,13 @@ pub fn apply_settings_update(
|
|||
}
|
||||
match settings.displayed_attributes.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
// safe to unwrap because len is 1
|
||||
if v.len() == 1 && v.iter().next().unwrap() == "*" || v.is_empty() {
|
||||
if v.contains("*") || v.is_empty() {
|
||||
schema.set_all_fields_as_displayed();
|
||||
} else {
|
||||
schema.update_displayed(v)?
|
||||
}
|
||||
},
|
||||
UpdateState::Clear => {
|
||||
println!("\n\n\n\nHERRE\n\n\n");
|
||||
schema.set_all_fields_as_displayed();
|
||||
},
|
||||
UpdateState::Nothing => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue