code: def exists(self, obj_id, obj_type=None):
          
          return self.object_key(obj_id, obj_type) in self._data
docs: 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.