Files
nexus/wiki/entities/Memsearch.md
2026-04-23 00:02:55 +08:00

43 lines
1.6 KiB
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: "memsearch"
type: entity
tags: [vector-search, semantic-search, openclaw, milvus]
sources: [semantic-memory-search]
last_updated: 2026-04-22
---
## Aliases
- memsearch
## Definition
memsearchZillizTech/memsearch是开源的向量语义搜索 CLI/库,专为 OpenClaw 等 Markdown 记忆系统设计,通过 Milvus 向量数据库实现语义搜索能力。用户可用自然语言提问而无需精确关键词。
## Key Features
- **混合搜索**:稠密向量(语义相似性)+ BM25关键词精确匹配通过 Reciprocal Rank Fusion (RRF) 重排
- **增量索引**SHA-256 内容哈希确保仅新增或变更内容被重新嵌入,节省 API 调用
- **文件监视器**`memsearch watch` 实时监控记忆文件变化,自动重建索引
- **多 Embedding 提供商**:支持 OpenAI、Google、Voyage、Ollama以及完全本地模式无需 API Key
- **Markdown 不可变**:原始 Markdown 文件是唯一真相,向量索引是派生缓存,可随时重建
## Usage
```bash
pip install memsearch
memsearch config init
memsearch index ~/path/to/memory/
memsearch search "what caching solution did we pick?"
memsearch watch ~/path/to/memory/
# 本地模式(无需 API Key
pip install "memsearch[local]"
memsearch config set embedding.provider local
memsearch index ~/path/to/memory/
```
## Connections
- [[Milvus]] — 向量数据库后端
- [[OpenClaw]] — 上层应用框架memsearch 为其 Markdown 记忆提供语义搜索
- [[Hybrid Search]] — memsearch 使用的搜索策略
- [[Content Hashing]] — memsearch 的增量索引机制