Files
nexus/wiki/concepts/增量索引.md
weishen e62797a33a Batch 9: Obsidian插件/AI开源平替/Coze培训/TK面单/Ubuntu科学上网
- Sources: 5个新文档
- Concepts: ProxyChains, SOCKS5代理, Docker Daemon代理
- Index: 更新至 Batch 9
- 累计 sources: 108/182
2026-04-16 06:36:36 +08:00

27 lines
790 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "增量索引"
type: concept
tags: [indexing, efficiency, vector-search]
date: 2026-04-16
---
## Definition
基于内容哈希SHA-256识别未变化的文件仅对新增或内容变更的文件重新构建索引避免对未变化内容重复计算。
## Why It Matters
- Embedding API 调用成本高,增量索引可节省 90%+ 的 API 费用
- 文件监视器实时触发增量索引,保持索引最新
- 零浪费:每枚 token 都花在真正变化的内容上
## Implementation
```python
# 内容哈希 → 对比上次索引记录
content_hash = sha256(file_content)
if content_hash not in last_index:
embed_and_index(file_content)
```
## Connections
- [[memsearch]]:增量索引的具体实现
- [[向量数据库]]:增量索引的存储后端