MCPcopy
hub / github.com/vearch/vearch

github.com/vearch/vearch @v3.5.9 sqlite

repository ↗ · DeepWiki ↗ · release v3.5.9 ↗
4,909 symbols 15,901 edges 382 files 832 documented · 17%
README

<a href="https://github.com/vearch/vearch/blob/master/README_ZH_CN.md">简体中文</a> | <a href="https://github.com/vearch/vearch/blob/master/README.md">English</a>

License: Apache-2.0 Build Status Go Report Card Gitter

简介

Vearch 是一个云原生分布式向量数据库,用于在 AI 应用程序中对向量进行高效的相似性搜索。

主要特性

  • 混合检索: 向量搜索和标量过滤。

  • 性能: 快速矢量检索 - 在几毫秒内搜索数百万个对象。

  • 可扩展性和可靠性: 弹性扩展和高可用。

文档

Restful 接口

OpenAPIS

SDK

SDK 描述
Python SDK Vearch的Python客户端
Go SDK Vearch的Go客户端
Java SDK Vearch的Java客户端
Rust SDK Vearch 的Rust客户端

使用案例

大模型记忆后端

Vearch与流行的AI框架集成:

框架 集成
Langchain 在Langchain中使用Vearch作为向量存储
LlamaIndex 与LlamaIndex集成构建知识库
Langchaingo 支持Vearch的Langchain的Go实现
LangChain4j 支持Vearch集成的Java实现

实际场景

  • 图片检索: Vearch 可用于构建完整的视觉搜索系统来索引数十亿张图像。还需要用于对象检测和特征提取的图像检索插件。

快速开始

k8s 部署 Vearch 集群

# 通过仓库添加charts
$ helm repo add vearch https://vearch.github.io/vearch-helm
$ helm repo update && helm install my-release vearch/vearch

# 或从本地添加charts
$ git clone https://github.com/vearch/vearch-helm.git && cd vearch-helm
$ helm install my-release ./charts -f ./charts/values.yaml

通过 docker-compose 使用 vearch

# 单节点模式
$ cd cloud && cp ../config/config.toml .
$ docker-compose --profile standalone up -d

# 集群模式
$ cd cloud && cp ../config/config_cluster.toml .
$ docker-compose --profile cluster up -d

其他部署方式 - Docker部署: 通过Docker部署Vearch - 源码编译部署: 从源代码编译Vearch

组件

Vearch 架构

arc

Master: 负责模式管理、集群级元数据和资源协调。

Router: 提供 RESTful API:upsertdeletesearchquery ; 请求路由和结果合并。

PartitionServer (PS): 使用基于 raft 的复制托管文档分区。 Gamma 是基于faiss实现的核心矢量搜索引擎,提供了存储、索引和检索向量和标量的能力。

技术参考

学术引用

在学术或研究项目中使用Vearch时,请引用我们的论文:

@misc{li2019design,
      title={The Design and Implementation of a Real Time Visual Search System on JD E-commerce Platform},
      author={Jie Li and Haifeng Liu and Chuanghua Gui and Jianyu Chen and Zhenyun Ni and Ning Wang},
      year={2019},
      eprint={1908.07389},
      archivePrefix={arXiv},
      primaryClass={cs.IR}
}

社区支持

联系我们

通过多种渠道与Vearch社区联系:

  • GitHub Issues: 在我们的问题页面中报告错误或请求功能
  • 电子邮件讨论: 如需公开讨论或提出问题,请发送电子邮件至vearch-maintainers@groups.io
  • Slack频道: 加入我们在Slack上的社区进行实时讨论

贡献

我们欢迎社区的贡献!查看我们的贡献指南开始参与。

开源许可

Vearch根据Apache许可证2.0版本授权。

有关完整的许可详情,请参阅我们仓库中的LICENSE和NOTICE


© 2019 Vearch Contributors. 保留所有权利。

Extension points exported contracts — how you extend this code

SortValue (Interface)
(no doc) [6 implementers]
internal/ps/engine/sortorder/sort.go
Metric (Interface)
Metric provides a method for metric objects. [4 implementers]
internal/pkg/metrics/metric.go
Request (Interface)
(no doc) [16 implementers]
internal/router/document/doc_rpc.go
SpaceClient (Interface)
@Author liujishuai @DATE 2025/8/1 8:01 PM [2 implementers]
sdk/java/vearch-java/src/main/java/com/jd/vearch/client/SpaceClient.java
Storage (Interface)
Storage exposes the methods for storing and accessing profiles. [1 implementers]
internal/debugutil/pprofui/storage.go
Store (Interface)
(no doc) [1 implementers]
internal/master/store/store.go
Config (Interface)
(no doc) [1 implementers]
sdk/go/auth/auth.go
EventListener (Interface)
this interface for event , server implements it [1 implementers]
internal/ps/storage/raftstore/server.go

Core symbols most depended-on inside this repo

Errorf
called by 601
internal/pkg/log/log.go
Error
called by 583
internal/pkg/log/log.go
NewError
called by 481
internal/proto/vearchpb/vearch_err.go
Error
called by 348
internal/pkg/log/log.go
New
called by 265
internal/entity/response/response.go
Info
called by 251
internal/pkg/log/log.go
Debug
called by 200
internal/pkg/log/log.go
JsonError
called by 189
internal/entity/response/response.go

Shape

Method 3,019
Function 1,195
Struct 360
Class 243
TypeAlias 47
Interface 32
FuncType 7
Route 6

Languages

Go58%
Python33%
Java9%

Modules by API surface

internal/proto/vearchpb/router_grpc.pb.go287 symbols
internal/engine/sdk/python/python/__init__.py111 symbols
internal/pkg/metrics/model.pb.go109 symbols
internal/proto/vearchpb/data_model.pb.go107 symbols
test/utils/vearch_utils.py83 symbols
internal/proto/vearchpb/raftcmd.pb.go72 symbols
internal/pkg/vearchlog/baud_glog.go63 symbols
internal/master/cluster_api.go63 symbols
test/test_cluster_ps.py62 symbols
scripts/benchmarks/utils.py60 symbols
test/utils/data_utils.py59 symbols
internal/engine/sdk/python/tests/utils/datasets.py59 symbols

Dependencies from manifests, versioned

github.com/HdrHistogram/hdrhistogram-gov1.1.2 · 1×
github.com/apache/thriftv0.16.0 · 1×
github.com/armon/go-metricsv0.4.1 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/bytedance/sonicv1.12.3 · 1×
github.com/bytedance/sonic/loaderv0.2.0 · 1×
github.com/cenk/backoffv2.2.1+incompatible · 1×
github.com/cenkalti/backoffv2.2.1+incompatible · 1×
github.com/cespare/xxhash/v2v2.2.0 · 1×
github.com/cheekybits/gennyv1.0.0 · 1×

Datastores touched

database_document_testDatabase · 1 repos
database_testDatabase · 1 repos
database_test_db1Database · 1 repos
database_test_vDatabase · 1 repos

For agents

$ claude mcp add vearch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact