Hanzo
Hanzo Skills Reference

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

ItemValue
TechRust workspace (23 crates)
Binarysearch
CLIsearchtool
Port7700 (default)
Repogithub.com/hanzoai/index
Imageghcr.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 limit
# 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:

CratePurpose
searchMain binary and HTTP API
milliCore indexing engine
index-schedulerAsync task scheduling
search-authAPI key management
search-typesShared request/response types
search-snapSnapshot and restore
searchtoolCLI maintenance tool
filter-parserQuery filter DSL
json-depth-checkerDocument validation
flatten-serde-jsonNested document flattening

Docker

docker run -p 7700:7700 \
  -v $(pwd)/search-data:/data \
  -e INDEX_MASTER_KEY=YOUR_KEY \
  ghcr.io/hanzoai/search:latest
  • hanzo/hanzo-database.md - PostgreSQL backend storage
  • hanzo/hanzo-datastore.md - Vector database integration

How is this guide?

On this page