Auto-sync: 2026-04-27 20:02

This commit is contained in:
2026-04-27 20:02:52 +08:00
parent 5854781fa8
commit de7ebe9256
59 changed files with 2122 additions and 1325 deletions

View File

@@ -0,0 +1,27 @@
---
title: "IncrementalIndexing"
type: concept
tags: []
---
## Definition
增量索引,只处理新增或变化的内容,避免重新处理未变化的数据。
## Key Mechanism
使用内容哈希(如 SHA-256标识每个文档块
1. 首次索引:计算哈希,存储 (哈希, 内容, 向量)
2. 后续索引:重新计算哈希,仅对不匹配的块进行嵌入
3. 未变化的块:跳过,零 API 调用
## Benefits
- **节省成本**:只嵌入新增/变化内容
- **提升速度**:跳过已索引内容
- **一致性保证**:相同内容始终生成相同向量
## Application
- [[memsearch]] 使用 SHA-256 内容哈希实现增量索引
- 文档原文始终是真相,索引是派生缓存
## Related Concepts
- [[memsearch]] — 实现增量索引的工具
- [[RAG]] — 检索增强生成