fix(retrieval): 修复原子性、过滤漏召回、tags 语义与 rebuild 回滚

- 元数据 + 向量单事务提交,避免 PATCH 半提交(审阅 #2)
- vectorstore upsert 改 delete-then-insert 幂等,支持共享 conn
- FTS 取全量 + 过滤 oversample,修复 metadata 过滤漏召回(审阅 #4)
- PATCH tags 区分 None/[]/非空:保留/清空/替换(审阅 #5)
- rebuild 拒绝增量 scope/note_ids,扫描先行 + 失败回滚旧索引(审阅 #6)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yxx
2026-08-27 22:48:55 +08:00
co-authored by Claude
parent 87717450fd
commit 6cf531f2a8
7 changed files with 275 additions and 120 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ def parse_note(
fallback_title = Path(file_path).stem
title = frontmatter.get("title") or _first_heading(markdown) or fallback_title
resolved_tags = list(tags) if tags else _parse_tags(frontmatter.get("tags"))
resolved_tags = list(tags) if tags is not None else _parse_tags(frontmatter.get("tags"))
blocks = parse_blocks(markdown, note_id)
return ParsedNote(