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

This commit is contained in:
2026-09-04 19:48:41 +08:00
parent d1cffb2f40
commit 6661f4f8c6
5 changed files with 156 additions and 5 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: