code: def reindex(self):
          
          for wh in self.whoosheers:
              index = type(self).get_or_create_index(_get_app(self), wh)
              writer = index.writer(timeout=_get_config(self)['writer_timeout'])
              for model in wh.models:
                  method_name = "{0}_{1}".format(UPDATE_KWD, model.__name__.lower())
                  for item in model.query.all():
                      getattr(wh, method_name)(writer, item)
              writer.commit()
docs: Reindex all data
  
          This method retrieves all the data from the registered models and
          calls the ``update_<model>()`` function for every instance of such
          model.