# 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。