03 · START

Migrate from Elasticsearch

XERJ runs a second API listener on 9200 that speaks the Elasticsearch wire format. The fast path to trying XERJ is to point your existing ES client at it and let the compat layer take the calls. It isn't 100% coverage; this page says exactly what is and isn't there.

What works day one

What needs rewriting

What's different (for the better)

A 10-minute migration

# 1. run XERJ alongside ES
$ xerj --config xerj.toml &

# 2. reindex one index, one-shot
$ curl -sX POST http://es:9200/logs-2026-04/_search?scroll=1m \
    -d '{"size":1000,"query":{"match_all":{}}}' \
    | jq -c '.hits.hits[]._source' \
    | xerj-ingest http://localhost:9200 logs-2026-04

# 3. compare one query
$ diff <(curl -s http://es:9200/logs-2026-04/_search -d @q.json) \
       <(curl -s http://localhost:9200/logs-2026-04/_search -d @q.json)

Source · engine/crates/api/src/es_compat.rs