zedsearch

package module
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ZedSearch

CI Nightly Release Go Reference Go Version golangci-lint Release Docs codecov

English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Русский | Português

ZedSearch

ZedSearch is a search engine that does full text indexing. It is a lightweight alternative to Elasticsearch and runs using a fraction of the resources. It uses bluge (via the vcaesar/riot fork) as the underlying indexing library.

It is very simple and easy to operate as opposed to Elasticsearch which requires a couple dozen knobs to understand and tune. You can get ZedSearch up and running in 2 minutes.

It is a drop-in replacement for Elasticsearch if you are just ingesting data using APIs and searching using kibana (Kibana is not supported with ZedSearch. ZedSearch provides its own UI).

Check the below video for a quick demo of ZedSearch.

Homebrew

macOS and Linux, via vcaesar/homebrew-tap:

brew install vcaesar/tap/zedsearch

Docker

Images are on Docker Hub as riotgo/zedsearch (linux/amd64, linux/arm64, linux/arm/v7):

Set ZED_FIRST_ADMIN_PASSWORD in your environment to your chosen password before running:

docker run -d --name zedsearch -p 4080:4080 \
    -v zedsearch-data:/data -e ZED_DATA_PATH=/data \
    -e ZED_FIRST_ADMIN_USER=admin -e "ZED_FIRST_ADMIN_PASSWORD=${ZED_FIRST_ADMIN_PASSWORD:?Set ZED_FIRST_ADMIN_PASSWORD}" \
    riotgo/zedsearch:latest

The named volume zedsearch-data is writable by the container user (uid 10001); to use a host directory instead, run mkdir -p ./data && sudo chown 10001:10001 ./data and mount -v "$PWD/data:/data".

Why ZedSearch

While Elasticsearch is a very good product, it is complex and requires lots of resources and is more than a decade old. I built ZedSearch so it becomes easier for folks to use full text search indexing without doing a lot of work.

Features:

go + gin (or fiber v3 with -tags fiber) + react

  1. Fast queries and smaller index files
  2. Provides full text and vector indexing capability
  3. Single binary for installation and running. Binaries available under releases for multiple platforms.
  4. Web UI for querying data written in React (embedded in the binary)
  5. Compatibility with Elasticsearch APIs for ingestion of data (single record and bulk API)
  6. Out of the box authentication
  7. Schema less - No need to define schema upfront and different documents in the same index can have different fields.
  8. Index storage in disk, s3, minio and others
  9. aggregation and full Elasticsearch features support
  10. multi languages support, support CJK
  11. Opt-in logs indexes with event-time normalization and log search defaults, ingesting JSON, Splunk HEC, Loki and OTLP/HTTP JSON (OpenObserve-compatible) and Logstash events
  12. kNN vector search and geo queries (geo_distance, geo_bounding_box, geo_polygon, geo_shape)
  13. Elasticsearch SQL API (/es/_sql, /es/_sql/translate) and MySQL CREATE TABLE schemas as mappings
  14. High-availability cluster: etcd-coordinated partition ownership, fenced handoff, replicas and scatter-gather search
  15. OpenTelemetry tracing over OTLP/HTTP (zed_tracing_enable); every request gets an X-Trace-Id that follows it across nodes
  16. Fleet and zedagent (agent/): enroll agents, manage policies, ship log files and system metrics, or run the agent standalone
  17. Robots-aware web crawler (cmd/zedcrawl) with PageRank and bulk indexing into ZedSearch

Benchmarks

Seven search-application queries over 50,000 documents, top 10 plus the exact total, on a MacBook Pro M1 with every server in Docker: a filtered term query, an OR over two fields, a sort by price over all documents, page 101, a terms and a histogram aggregation, and highlighting. Lower is better, except QPS; "—" means the engine cannot express the query (Meilisearch has no numeric histogram, OpenObserve does not highlight).

Query ZedSearch ZincSearch 0.4.10 Elasticsearch 9.5 OpenSearch 3.9 Meilisearch 1.56 OpenObserve 1.1
filtered (1 client) 0.89 ms 3.43 ms 1.38 ms 1.44 ms 1.87 ms 9.44 ms
filtered (8 clients) 3,216 QPS 471 QPS 2,742 QPS 3,066 QPS 1,924 QPS 321 QPS
sort_price (50k docs) 0.74 ms 76.0 ms 2.52 ms 1.58 ms 1.09 ms 4.40 ms
multi_field title + body 0.63 ms 2.04 ms 1.44 ms 1.51 ms 1.19 ms 21.0 ms
deep_page from 1000 1.24 ms 3.40 ms 1.42 ms 1.47 ms 12.7 ms 18.1 ms
agg_terms category 1.48 ms 5.55 ms 1.66 ms 2.12 ms 1.63 ms 18.6 ms
agg_histogram price 1.00 ms 20.1 ms 1.67 ms 1.72 ms — 18.7 ms
highlight body 0.81 ms 2.27 ms 1.96 ms 1.97 ms 1.92 ms —
Single queries (v2)

The v2 queries from the same sessions, one query type each. Meilisearch cannot express OR or exact phrases.

Query ZedSearch ZincSearch 0.4.10 Elasticsearch 9.5 OpenSearch 3.9 Meilisearch 1.56 OpenObserve 1.1
term rare 0.50 ms 1.03 ms 1.43 ms 1.16 ms 1.14 ms 15.7 ms
term mid 0.58 ms 1.82 ms 1.28 ms 1.27 ms 1.16 ms 17.6 ms
term keyword 0.57 ms 0.82 ms 1.75 ms 2.32 ms 1.03 ms 5.59 ms
bool should 0.63 ms 1.12 ms 1.61 ms 1.75 ms — 26.7 ms
bool must 1.01 ms 1.79 ms 2.36 ms 3.30 ms 1.28 ms 24.1 ms
range 0.64 ms 2.56 ms 1.32 ms 1.28 ms 1.32 ms 5.31 ms
match_all 0.66 ms 4.12 ms 1.48 ms 1.38 ms 1.03 ms 4.68 ms
prefix w1* 0.71 ms 214.5 ms 1.87 ms 2.66 ms 1.32 ms 11.9 ms
match_phrase 10.3 ms 55.6 ms 12.7 ms 12.6 ms — 16.3 ms
bool should (8 clients) 5,179 QPS 1,292 QPS 2,707 QPS 2,616 QPS — 131 QPS
Footprint

Docker image (uncompressed), text index of the same 50,000 documents (about 25 MB for ZedSearch, Elasticsearch and OpenSearch after _flush), and memory / CPU over the whole run (100% = 1 vCPU), the data is the median of three runs.

Resource ZedSearch ZincSearch 0.4.10 Elasticsearch 9.5 OpenSearch 3.9 Meilisearch 1.56 OpenObserve 1.1
Docker image 56.4 MB 72.4 MB 1,195 MB 1,311 MB 370 MB 434 MB
Text index, 50k docs 25.9 MB 133.3 MB 25.8 MB 25.7 MB 454 MB 14.2 MB (Not indexed)
Memory idle 14 MiB 64 MiB 2,674 MiB 2,699 MiB 179 MiB 387 MiB
Memory peak 388 MiB 858 MiB 3,185 MiB 3,191 MiB 1,014 MiB 919 MiB
CPU mean 134% 366% 157% 156% 230% 140%
CPU peak 553% 710% 620% 529% 545% 519%

Documentation

Documentation is available at docs/web, API documentation at zedsearch-docs

Screenshots

Search screen

Search screen

Index screen

Index screen

Getting started

Quickstart

Check Quickstart

Releases

ZedSearch has hundreds of production installations.

Binaries for every platform are on the releases page. The default archives are not UPX-compressed; for a smaller download, all Linux builds and the Windows amd64 build also ship a UPX-packed *_upx.tar.gz (slightly slower startup, and some antivirus tools may flag packed .exe files).

Build

Set ZED_FIRST_ADMIN_USER / ZED_FIRST_ADMIN_PASSWORD or configure conf/zed.toml (see below), then run from the repository root:

go run cmd/zedsearch/main.go      # API-only, :4080
go run cmd/zedsearch/main.go web  # with the web UI (Node.js 24+ and npm)

web produces test/zedsearch-web, a standalone binary with the UI embedded.

Configuration

Settings are applied in order: built-in defaults (pkg/config/default.toml), then the optional conf/zed.toml in the working directory, then non-empty environment variables. Every key is also an environment variable in uppercase, e.g. zed_server_port → ZED_SERVER_PORT.

# conf/zed.toml
zed_first_admin_user = "admin"
zed_first_admin_password = "change-me"
zed_server_port = "4080"
zed_data_path = "./data"
zed_log_level = "info"

[Shard]
zed_shard_num = 3
  • Only list the keys you change; grouped keys keep their table header from default.toml ([Shard], [S3], [Etcd], ...).
  • Unknown keys fail startup. Durations are in nanoseconds, sizes in bytes.
  • The first admin credentials only create the admin user on first start; change the password after logging in and never commit real credentials.

Community

Examples

You can use ZedSearch to index and search any data. Here are some examples that folks have created to index and search enron email dataset using zedsearch:

  1. https://github.com/jorgeloaiza48/Enron-Email-DataSet
  2. https://github.com/jhojanperlaza/email_search_engine
  3. https://github.com/carlosarraes/zinmail
  4. https://github.com/devjopa/golab-search
  5. https://github.com/avaco2312/zincsearch
  6. https://github.com/paolorossig/email-indexer
  7. https://github.com/ulimonte05/zincsearching

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFrontendAssets

func GetFrontendAssets() (fs.FS, error)

GetFrontendAssets returns nil in API-only builds. Build with -tags web to embed the UI.

Types

This section is empty.

Directories

Path Synopsis
cmd
zedsearch command
zedsearch/mockdata command
Command mockdata writes deterministic mock documents straight into the configured data path (zed_data_path), without going through the HTTP API.
Command mockdata writes deterministic mock documents straight into the configured data path (zed_data_path), without going through the HTTP API.
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
pkg
cluster/replication
Package replication keeps the data of every index on more than one node, following the three OpenSearch replication paths:
Package replication keeps the data of every index on more than one node, following the three OpenSearch replication paths:
handlers/sql
Package sql exposes the Elasticsearch SQL endpoints.
Package sql exposes the Elasticsearch SQL endpoints.
handlers/synonyms
Package synonyms serves the Elasticsearch compatible synonyms sets API.
Package synonyms serves the Elasticsearch compatible synonyms sets API.
logs
Package logs supplies the logs profile for ZedSearch's WAL-backed indexes.
Package logs supplies the logs profile for ZedSearch's WAL-backed indexes.
meta/elastic
Package elastic holds the ElasticSearch specific meta declarations and util functions.
Package elastic holds the ElasticSearch specific meta declarations and util functions.
sql
Package sql implements the Elasticsearch SQL API: it parses a subset of SQL SELECT, translates it to the zed query DSL and formats the result.
Package sql implements the Elasticsearch SQL API: it parses a subset of SQL SELECT, translates it to the zed query DSL and formats the result.
tracing
Package tracing follows a request across nodes with OpenTelemetry.
Package tracing follows a request across nodes with OpenTelemetry.
uquery/analysis/internal/testutil
Package testutil holds helpers shared by the analysis test packages.
Package testutil holds helpers shared by the analysis test packages.
uquery/assoc
Package assoc implements the Elasticsearch "associated terms" features (more_like_this, suggesters, significant_terms) as pure functions over riot readers.
Package assoc implements the Elasticsearch "associated terms" features (more_like_this, suggesters, significant_terms) as pure functions over riot readers.
wal
zhttp
Package zhttp is the HTTP layer the handlers are written against.
Package zhttp is the HTTP layer the handlers are written against.
test
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL