@task
def migrate_search(ctx, delete=False, index=settings.ELASTIC_INDEX):
 from website.app import init_app
 init_app(routes=False, set_backends=False)
 from website.search_migration.migrate import migrate
 migrate(delete, index=index)

@ task def migrate_search ( ctx , delete = False , index = settings . ELASTIC_INDEX ) : from website . app import init_app init_app ( routes = False , set_backends = False ) from website . search_migration . migrate import migrate migrate ( delete , index = index )
migrate the search-enabled models .