nex_docus/docs/sdd/architecture/decisions/ADR-0004-dual-search-engine.md

19 lines
654 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ADR-0004全文Whoosh+ 语义ZVec双检索引擎
- **状态**Accepted
## 背景
既需要全文关键词检索,又需要语义向量检索支撑 RAG。
## 决策
1. 全文检索Whoosh3 本地索引(`search_index`),中文自定义 `ChineseAnalyzer`(基于 jieba
2. 语义向量ZVec 本地向量库(`vector_index`,每项目一个 collection+ 可配置 embedding 模型LLMModelConfig 的 `model_type=embedding`)。
## 后果
- 两套索引需在文件变更时同步维护ADR-0006
- 向量维度变更时需重建 collection 并全量重向量化。
## 关联
DV-0005, DV-0006, DV-0007。