def exists(self, obj_id, obj_type=None):
        """
        Return whether the given object exists in the search index.

        :param obj_id: The object's unique identifier.
        :param obj_type: The object's type.
        """
        return self.object_key(obj_id, obj_type) in self._data