def __setattr__(self, name, val):
        # TODO: Probably use `Field`s as descriptors and leave this to them
        if name in self._meta.fields:
            f = self._meta.fields[name]
            val = f.to_search_value(val)
        super(DocumentModel, self).__setattr__(name, val)
Make sure that any attibutes set on document class instances get the
dataset/ETHPy150Open potatolondon/search/search/indexes.py/DocumentModel.__setattr__