浏览代码

fix: flush_search_index must be called before removing snapshots

JDC 5 年之前
父节点
当前提交
c5b1b91708
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      archivebox/main.py

+ 1 - 1
archivebox/main.py

@@ -665,8 +665,8 @@ def remove(filter_str: Optional[str]=None,
 
     to_remove = snapshots.count()
 
-    remove_from_sql_main_index(snapshots=snapshots, out_dir=out_dir)
     flush_search_index(snapshots=snapshots)
+    remove_from_sql_main_index(snapshots=snapshots, out_dir=out_dir)
     all_snapshots = load_main_index(out_dir=out_dir)
     log_removal_finished(all_snapshots.count(), to_remove)