def recreate_elastic_store(self): self.es.send_request( 'DELETE', [self.dbm.database_name, self.latest_form_model.id, '_mapping']) self.es.put_mapping(self.dbm.database_name, self.latest_form_model.id, self.get_mappings()) from datawinners.search.submission_index_task import async_populate_submission_index async_populate_submission_index.delay(self.dbm.database_name, self.latest_form_model.form_code)
def recreate_and_populate_elastic_store(self): self.recreate_elastic_store() from datawinners.search.submission_index_task import async_populate_submission_index async_populate_submission_index.delay(self.dbm.database_name, self.latest_form_model.id)