code: def update(self, key, content, **metadata):
          
          self.remove(key, preserve_data=True)
          self.add(key, content, **metadata)
docs: :param key: Document unique identifier.
          :param str content: Content to store and index for search.
          :param metadata: Arbitrary key/value pairs to store for document.
  
          Update the given document. Existing metadata will be preserved and,
          optionally, updated with the provided metadata.