dsh-doc-index
工作区文档本地语义索引,混合检索并返回带行号的引用,支持增量更新。 适合需要在本地文档中做语义检索的用户,支持多种格式并自动监听更新。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/docindex說明文件
閱讀完整 README ↗Configuration reference
| Key | Default | Meaning |
|---|---|---|
roots | [] → process.cwd() | Workspace root(s) to scan. |
dbPath | '' → $DSH_HOME/doc-index/index.db | SQLite database path (:memory: allowed). |
openAt | startup | When to open the DB: startup, first-use, never. |
update | watch | Keep the index current: watch (fs.watch + debounce) or manual. |
watchDebounceMs | 1500 | Debounce for the watch-driven rescan. |
excludes | [] | Extra gitignore-style patterns (see notes below). |
includeHidden | false | Index dot-files/directories. |
followSymlinks | false | Follow directory symlinks (cycles are broken). |
maxDocs | 20000 | Max documents in the index. |
maxSegments | 300000 | Max stored text segments. |
maxEmbeddedSegments | 50000 | Max segments that receive an embedding vector. |
maxFileBytes | 5 MB | Skip files larger than this. |
maxDepth | 64 | Max directory depth below a root (0 = unlimited). |
maxWalkedFiles | 200000 | Max candidate files collected per scan (the internal examined-file budget is 4×). If the walk is truncated by this cap, no pruning happens on that run. |
tokenizer.cjkN | 2 | CJK n-gram depth: 1 (unigrams), 2 (+bigrams), 3 (+trigrams). |
segmentChars | 400 | Approx. max chars per indexed segment. |
snippetChars | 240 | Max snippet length returned per hit. |
textExtensions | [] | Extra extensions (e.g. .csv) treated as plain UTF-8 text. |
search.topK | 10 | Default hits per query (1–50). |
search.minScore | 0 | Filter fused results below this normalized score. |
search.mode | auto | auto, lexical, or semantic. |
search.highlight | true | Wrap matched terms in **…**. |
search.matchOp | and | Combine query runs with and or or. |
search.rrfK | 60 | RRF constant. |
search.semanticWeight | 0.5 | Weight of the semantic list in RRF (lexical gets 1 - w). |
embedding.provider | ngram | none, ngram, or transformers. |
embedding.dim | 256 | ngram embedder dimension. |
embedding.model | '' | transformers model id (default: multilingual MiniLM). |
embedding.device / cacheDir / quantized | auto / HF cache / true | transformers provider options. |
journalMode | wal | SQLite journal mode. |