mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
remove accept new fields / add indexed *
This commit is contained in:
parent
7f5fb50307
commit
51b7cb2722
4 changed files with 111 additions and 149 deletions
|
@ -29,8 +29,6 @@ pub struct Settings {
|
|||
#[serde(default, deserialize_with = "deserialize_some")]
|
||||
pub synonyms: Option<Option<BTreeMap<String, Vec<String>>>>,
|
||||
#[serde(default, deserialize_with = "deserialize_some")]
|
||||
pub accept_new_fields: Option<Option<bool>>,
|
||||
#[serde(default, deserialize_with = "deserialize_some")]
|
||||
pub attributes_for_faceting: Option<Option<Vec<String>>>,
|
||||
}
|
||||
|
||||
|
@ -60,7 +58,6 @@ impl Settings {
|
|||
displayed_attributes: settings.displayed_attributes.into(),
|
||||
stop_words: settings.stop_words.into(),
|
||||
synonyms: settings.synonyms.into(),
|
||||
accept_new_fields: settings.accept_new_fields.into(),
|
||||
attributes_for_faceting: settings.attributes_for_faceting.into(),
|
||||
})
|
||||
}
|
||||
|
@ -167,7 +164,6 @@ pub struct SettingsUpdate {
|
|||
pub displayed_attributes: UpdateState<HashSet<String>>,
|
||||
pub stop_words: UpdateState<BTreeSet<String>>,
|
||||
pub synonyms: UpdateState<BTreeMap<String, Vec<String>>>,
|
||||
pub accept_new_fields: UpdateState<bool>,
|
||||
pub attributes_for_faceting: UpdateState<Vec<String>>,
|
||||
}
|
||||
|
||||
|
@ -181,7 +177,6 @@ impl Default for SettingsUpdate {
|
|||
displayed_attributes: UpdateState::Nothing,
|
||||
stop_words: UpdateState::Nothing,
|
||||
synonyms: UpdateState::Nothing,
|
||||
accept_new_fields: UpdateState::Nothing,
|
||||
attributes_for_faceting: UpdateState::Nothing,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,16 +68,6 @@ pub fn apply_settings_update(
|
|||
UpdateState::Nothing => (),
|
||||
}
|
||||
|
||||
match settings.accept_new_fields {
|
||||
UpdateState::Update(v) => {
|
||||
schema.set_accept_new_fields(v);
|
||||
},
|
||||
UpdateState::Clear => {
|
||||
schema.set_accept_new_fields(true);
|
||||
},
|
||||
UpdateState::Nothing => (),
|
||||
}
|
||||
|
||||
match settings.searchable_attributes.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
if v.len() == 1 && v[0] == "*" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue