fix(retrieval): 按索引策略重建并融合跨空间检索

This commit is contained in:
2026-09-04 19:48:41 +08:00
parent 468eb56daa
commit 78dd774bce
7 changed files with 170 additions and 9 deletions
+2
View File
@@ -118,6 +118,8 @@ async def index_note(
blocks=parsed.blocks,
)
old_ids = set(old_block_ids)
conn.execute("UPDATE blocks SET embedding_local_only=? WHERE note_id=?",
(int(parsed.embedding_local_only), parsed.note_id))
new_ids = {block.block_id for block in parsed.blocks}
stale_ids = [bid for bid in old_ids if bid not in new_ids]
if stale_ids: