Hanzo Search - High-Performance Search Engine
Hanzo Search is a high-performance search engine — a Rust workspace of 23 crates delivering typo-tolerant full-text search, vector and hybrid retrieval, AI ranking, and faceting in sub-50ms across millions of documents.
Overview
Hanzo Search is a high-performance search engine: documents in, ranked results out. It is a Rust workspace of 23 crates providing typo-tolerant full-text search, dense-vector and hybrid retrieval, AI ranking, and faceting — designed for sub-50ms queries across millions of documents. It ships as a single binary with no external dependencies.
Layout: the server binary is search, the operator CLI is searchtool, and the core index engine is the milli crate. Repo: hanzoai/index. Dual licensed: MIT for open-source use, with a separate enterprise license (LICENSE-EE).
Features
- Full-text search: Typo-tolerant, prefix matching, phrase search
- Vector search: Hybrid keyword + semantic search with embeddings
- AI ranking: ML-based relevance scoring and reranking
- Faceted search: Filterable, sortable, with distribution counts
- Multi-index: Multiple independent search indices
- RESTful API: Simple HTTP/JSON interface
- Self-hostable: Single binary, no external dependencies
When to use
- Adding search to applications or documentation
- Building product catalogs with faceted filtering
- Implementing hybrid keyword + semantic search
- Replacing Elasticsearch/Algolia with a lighter alternative
Quick reference
| Item | Value |
|---|---|
| Tech | Rust workspace (23 crates) |
| Binary | search |
| CLI | searchtool |
| Port | 7700 (default) |
| Repo | github.com/hanzoai/index |
| Image | ghcr.io/hanzoai/search:latest |
One-file quickstart
cd index
# Build
cargo build --release
# Run
./target/release/search --http-addr 0.0.0.0:7700 --master-key YOUR_KEY
# Index documents
curl -X POST http://localhost:7700/indexes/movies/documents \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
--data-binary @movies.json
# Search
curl http://localhost:7700/indexes/movies/search \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"q": "batman", "limit": 10}'Configuration
# Environment variables
INDEX_MASTER_KEY=your-master-key # API authentication
INDEX_DB_PATH=./data.ms # Data directory
INDEX_HTTP_ADDR=0.0.0.0:7700 # Listen address
INDEX_ENV=production # production or development
INDEX_MAX_INDEXING_MEMORY=2Gi # Indexing memory limitVector Search
# Create index with embedder
curl -X PATCH http://localhost:7700/indexes/docs/settings \
-H "Authorization: Bearer YOUR_KEY" \
-d '{
"embedders": {
"default": {
"source": "openAi",
"apiKey": "sk-...",
"model": "text-embedding-3-small",
"dimensions": 1536
}
}
}'
# Hybrid search (keyword + vector)
curl http://localhost:7700/indexes/docs/search \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"q": "how to deploy", "hybrid": {"semanticRatio": 0.5}}'Workspace Crates
Key crates in the Rust workspace:
| Crate | Purpose |
|---|---|
search | Main binary and HTTP API |
milli | Core indexing engine |
index-scheduler | Async task scheduling |
search-auth | API key management |
search-types | Shared request/response types |
search-snap | Snapshot and restore |
searchtool | CLI maintenance tool |
filter-parser | Query filter DSL |
json-depth-checker | Document validation |
flatten-serde-json | Nested document flattening |
Docker
docker run -p 7700:7700 \
-v $(pwd)/search-data:/data \
-e INDEX_MASTER_KEY=YOUR_KEY \
ghcr.io/hanzoai/search:latestRelated Skills
hanzo/hanzo-database.md- PostgreSQL backend storagehanzo/hanzo-datastore.md- Vector database integration
How is this guide?