fix: 去重合并多来源后同步到 events/Qdrant/MySQL,新增 sync-sources 回填命令

- dedup/pipeline: 合并 source_ids 后自动同步已生成的 events JSON 和 Qdrant payload
- 新增 sync_sources_from_deduped / uv run en-news sync-sources,用于历史数据回填
- sync-sources 会扫描 deduped 多来源唯一篇,更新 events、Qdrant、MySQL news_event.sources
- docs: 补充 sync-sources 使用说明
This commit is contained in:
2026-08-23 10:55:23 +08:00
parent cf74e5e7f5
commit 9e4f5b4c75
4 changed files with 178 additions and 0 deletions
+4
View File
@@ -12,6 +12,7 @@
| `index` | M6 写入 Qdrant | `--recreate` 重建;`--date/-d` 指定日期;`--all` 全量回灌 |
| `search` | M6 语义检索 | 必需 query;`--top-k` 返回条数 |
| `report` | M9 生成日报并入库 | 无 |
| `sync-sources` | 把 deduped 已合并的多来源同步到 events/Qdrant/MySQL | 无 |
| `pipeline` | M2→M6(+日报) | `--skip-report` 跳过日报;`--date/-d` 指定日期 |
| `mcp-server` | M8 启动 MCP 服务 | 无 |
@@ -38,6 +39,9 @@ uv run en-news index --date 20260801
# 全量回灌历史向量(--recreate 搭配 --all 时只会在首个日期重建 collection)
uv run en-news index --all
uv run en-news embed --all
# 修复历史多来源:把 deduped 中已合并的 source_ids 同步到 events/Qdrant/MySQL
uv run en-news sync-sources
```
## 2. Shell 脚本