What is Vearch?
Vearch is a cloud-native distributed vector database for similarity search over embedding vectors in AI applications. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Go, C++, Python and licensed Apache-2.0. To get started: deploy on Kubernetes with Helm.
Overview
Vearch is a cloud-native distributed vector database for similarity search over embedding vectors in AI applications. It combines vector search with scalar filtering in the same query, so you can ask for the nearest neighbours of an embedding while restricting results by ordinary fields such as a name or a number. The project describes its goal as searching millions of objects in milliseconds, with replication and elastic scale-out for reliability.
A Vearch cluster is split into three roles. The Master handles schema management, cluster-level metadata and resource coordination. The Router exposes the RESTful API — upsert, delete, search and query — routes each request and merges the partial results. PartitionServers host the document partitions with Raft-based replication, and each one runs Gamma, Vearch's core vector search engine built on faiss, which stores, indexes and retrieves both the vectors and the scalar fields.

Data is organised as databases containing spaces, where a space is a schema of typed fields — strings, integers and fixed-dimension vectors, each with its own index. Beyond the REST API there are official Python, Go, Java and Rust SDKs, and integrations that plug Vearch in as the vector store for LangChain, LlamaIndex, Langchaingo and LangChain4j. The paper the project asks researchers to cite, from 2019, describes a real-time visual search system built on the JD e-commerce platform.
What it does
- Hybrid search: nearest-neighbour vector search combined with scalar filtering in one request
- Distributed architecture with separate Master, Router and PartitionServer roles
- Raft-based replication of partitions and elastic scale-out
- Gamma, a faiss-based engine that stores, indexes and retrieves vectors and scalars
- RESTful API plus Python, Go, Java and Rust SDKs
- Vector-store integrations for LangChain, LlamaIndex, Langchaingo and LangChain4j
Getting started
Vearch runs as a server cluster — deploy it on Kubernetes with Helm or locally with Docker Compose — and you talk to its Router over REST or through an SDK. The steps below follow the README and the Python SDK README.
Deploy on Kubernetes with Helm
The project publishes a Helm chart repository.
helm repo add vearch https://vearch.github.io/vearch-helm
helm repo update && helm install my-release vearch/vearchOr run it with Docker Compose
From a clone of the repository, copy a config into the cloud directory and pick standalone or cluster mode.
git clone https://github.com/vearch/vearch.git && cd vearch
# Standalone mode
cd cloud && cp ../config/config.toml .
docker-compose --profile standalone up -d
# Cluster mode (instead of the above)
# cd cloud && cp ../config/config_cluster.toml .
# docker-compose --profile cluster up -dInstall the Python SDK and connect
Point the client at your Router address.
pip3 install pyvearchCreate a database and a space
A space is a schema of typed fields; here two scalar fields with scalar indexes and a 512-dimension vector field with a flat inner-product index.
from vearch.core.vearch import Vearch
from vearch.config import Config
from vearch.schema.field import Field
from vearch.schema.space import SpaceSchema
from vearch.utils import DataType, MetricType, VectorInfo
from vearch.schema.index import FlatIndex, ScalarIndex
config = Config(host="your router path", token="secret")
vc = Vearch(config)
vc.create_database("database_test")
book_name = Field("book_name", DataType.STRING, desc="the name of book", index=ScalarIndex("book_name_idx"))
book_num = Field("book_num", DataType.INTEGER, desc="the num of book", index=ScalarIndex("book_num_idx"))
book_vector = Field("book_character", DataType.VECTOR, FlatIndex("book_vec_idx", MetricType.Inner_product), dimension=512)
space_schema = SpaceSchema("book_info", fields=[book_name, book_num, book_vector])
vc.create_space("database_test", space_schema)Upsert documents and search
Insert a document, run a vector search, then query by scalar filter.
import random
from vearch.filter import Filter, Condition, FieldValue
data = [{"book_name": "Write", "book_num": 7, "book_character": [random.uniform(0, 1) for _ in range(512)]}]
ret = vc.upsert("database_test", "book_info", data)
document_ids = ret.get_document_ids()
vi = VectorInfo("book_character", [random.uniform(0, 1) for _ in range(512)])
ret = vc.search("database_test", "book_info", vector_infos=[vi], limit=7)
print(ret.documents)
filters = Filter(operator="AND", conditions=[
Condition(operator=">", fv=FieldValue(field="book_num", value=0)),
Condition(operator="IN", fv=FieldValue(field="book_name", value=["Write"])),
])
ret = vc.query("database_test", "book_info", filter=filters)
print(ret.documents)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it when you need a self-hosted vector database that scales out across nodes with replicated partitions
- Reach for it when similarity search has to be combined with scalar filters on ordinary fields in the same query
- Reach for it as the vector store behind a LangChain, LlamaIndex, Langchaingo or LangChain4j RAG pipeline
- Reach for it to build a large-scale visual search system — the README says Vearch can back a visual search system indexing billions of images, with a separate image-retrieval plugin for object detection and feature extraction
How Vearch compares
Vearch alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Supabase | ★ 116k | Managed Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data. |
| Redis Cloud | ★ 77.8k | Fully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings. |
| Milvus | ★ 46.8k | A distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment. |
| FAISS | ★ 42k | A library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes. |
| Qdrant | ★ 35.8k | A Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems. |
| Chroma | ★ 29.8k | A developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API. |
| pgvector | ★ 23.9k | A PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database. |
| Vearch | ★ 2.3k | A cloud-native distributed vector database with hybrid vector and scalar search |
