mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Fix an issue with settings diff and * in the searchable attributes
This commit is contained in:
parent
0c6e4b2f00
commit
1ab03c4ede
@ -1112,12 +1112,11 @@ impl InnerIndexSettingsDiff {
|
||||
|| self.old.proximity_precision != self.new.proximity_precision
|
||||
}
|
||||
|
||||
/// Returns only the additional searchable fields if any
|
||||
/// other searchable field has been modified, returns None.
|
||||
/// Returns only the additional searchable fields.
|
||||
/// If any other searchable field has been modified, returns None.
|
||||
pub fn only_additional_fields(&self) -> Option<HashSet<String>> {
|
||||
match (&self.old.user_defined_searchable_fields, &self.new.user_defined_searchable_fields) {
|
||||
(None, None) | (Some(_), None) => None,
|
||||
(None, Some(new)) => Some(new.iter().cloned().collect()),
|
||||
(None, None) | (Some(_), None) | (None, Some(_)) => None, // None means *
|
||||
(Some(old), Some(new)) => {
|
||||
let old: HashSet<_> = old.iter().cloned().collect();
|
||||
let new: HashSet<_> = new.iter().cloned().collect();
|
||||
|
Loading…
Reference in New Issue
Block a user