def replace(self, key, content, **metadata):
        """
        :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 not be removed and
        replaced with the provided metadata.
        """
        self.remove(key)
        self.add(key, content, **metadata)
: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 not be removed and
        replaced with the provided metadata.