Put only_additional_fields to None if the difference gives an empty result.

This commit is contained in:
ManyTheFish 2024-06-05 10:51:16 +02:00
parent 261e92d7e6
commit 0a4118329e

View File

@ -1127,7 +1127,7 @@ impl InnerIndexSettingsDiff {
let new: HashSet<_> = new.iter().cloned().collect();
if old.difference(&new).next().is_none() {
// if no field has been removed return only the additional ones
Some(&new - &old)
Some(&new - &old).filter(|x| !x.is_empty())
} else {
None
}