mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +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
|
|| self.old.proximity_precision != self.new.proximity_precision
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns only the additional searchable fields if any
|
/// Returns only the additional searchable fields.
|
||||||
/// other searchable field has been modified, returns None.
|
/// If any other searchable field has been modified, returns None.
|
||||||
pub fn only_additional_fields(&self) -> Option<HashSet<String>> {
|
pub fn only_additional_fields(&self) -> Option<HashSet<String>> {
|
||||||
match (&self.old.user_defined_searchable_fields, &self.new.user_defined_searchable_fields) {
|
match (&self.old.user_defined_searchable_fields, &self.new.user_defined_searchable_fields) {
|
||||||
(None, None) | (Some(_), None) => None,
|
(None, None) | (Some(_), None) | (None, Some(_)) => None, // None means *
|
||||||
(None, Some(new)) => Some(new.iter().cloned().collect()),
|
|
||||||
(Some(old), Some(new)) => {
|
(Some(old), Some(new)) => {
|
||||||
let old: HashSet<_> = old.iter().cloned().collect();
|
let old: HashSet<_> = old.iter().cloned().collect();
|
||||||
let new: HashSet<_> = new.iter().cloned().collect();
|
let new: HashSet<_> = new.iter().cloned().collect();
|
||||||
|
Loading…
Reference in New Issue
Block a user