diff --git a/learning_resources_search/tasks.py b/learning_resources_search/tasks.py index 322fcd05f3..1d94d7b935 100644 --- a/learning_resources_search/tasks.py +++ b/learning_resources_search/tasks.py @@ -797,7 +797,9 @@ def finish_recreate_index(results, backing_indices): errors = merge_strings(results) if errors: try: - api.delete_orphaned_indexes() + api.delete_orphaned_indexes( + list(backing_indices.keys()), delete_reindexing_tags=True + ) except RequestError as ex: raise RetryError(str(ex)) from ex msg = f"Errors occurred during recreate_index: {errors}"