def reset_index(self): if self.backend.rebuilder_class: for index, indexed_models in group_models_by_index(self.backend, [models.SearchTest, models.SearchTestChild]).items(): rebuilder = self.backend.rebuilder_class(index) index = rebuilder.start() for model in indexed_models: index.add_model(model) rebuilder.finish()