From 1ab03c4ede545acf90d0c1afa2c0e715c8bbd47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 29 May 2024 14:49:09 +0200 Subject: [PATCH] Fix an issue with settings diff and * in the searchable attributes --- milli/src/update/settings.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/milli/src/update/settings.rs b/milli/src/update/settings.rs index c3e4ab3fa..af37a205c 100644 --- a/milli/src/update/settings.rs +++ b/milli/src/update/settings.rs @@ -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> { 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();