in opensearch_dsl/mapping.py [0:0]
def update(self, mapping, update_only=False):
for name in mapping:
if update_only and name in self:
# nested and inner objects, merge recursively
if hasattr(self[name], "update"):
# FIXME only merge subfields, not the settings
self[name].update(mapping[name], update_only)
continue
self.field(name, mapping[name])
if update_only:
for name in mapping._meta:
if name not in self._meta:
self._meta[name] = mapping._meta[name]
else:
self._meta.update(mapping._meta)