Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

docs(recipes): publish 10 AI/search recipes as site pages — validated live, docs reconciled to measured reality

xerj-org188501aac62d
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
new file mode 100644
index 000000000..7a60b85e1
--- /dev/null
+++ b/docs/examples/.gitignore
@@ -0,0 +1,2 @@
+__pycache__/
+*.pyc
diff --git a/docs/examples/agentic-memory/agent_memory.py b/docs/examples/agentic-memory/agent_memory.py
index 1d404b78b..0e5f2a89a 100644
--- a/docs/examples/agentic-memory/agent_memory.py
+++ b/docs/examples/agentic-memory/agent_memory.py
@@ -19,13 +19,16 @@ neural -- see the note by embed()). In production you bring your own vectors
which is exactly what lets XERJ replace a bolt-on vector DB for agent memory.
"""
+import os
import json
import math
import re
import urllib.request
from urllib.error import HTTPError
-BASE = "http://localhost:9481"
+# Server URL: read XERJ_URL (or the legacy BASE alias); default to the stock
+# XERJ port 9200. No un-overridable hardcoded port -- point this at any node.
+BASE = os.environ.get("XERJ_URL") or os.environ.get("BASE") or "http://localhost:9200"
DIM = 96 # embedding dimensionality for the toy hashing embedder
@@ -101,6 +104,36 @@ def show(label: str, hits: list) -> None:
print(f" [{h['score']:.3f}] ({kind:10}) {h['text']}")
+# --------------------------------------------------------------------------- #
+# Quantified recall quality. The point of agent memory is to recall the RIGHT
+# memory for a new question, so we MEASURE that instead of eyeballing it: a set
+# of probe questions, each labeled with the one memory that correctly answers
+# it, scored by recall@1 (was the right memory ranked first?) and recall@3
+# (was it in the top 3?). We report the number both recall paths actually hit.
+# --------------------------------------------------------------------------- #
+PROBES = [
+ ("What language should we choose for a new backend service?", "ada-1"),
+ ("Which region is production deployed in?", "ada-2"),
+ ("Are we using tabs or spaces, and what line width?", "ada-3"),
+ ("Which service owns the Postgres ledger database?", "ada-4"),
+ ("What has to pass in CI before a deploy?", "ada-5"),
+ ("What do we use for tracing?", "ada-6"),
+]
+
+
+def evaluate_recall(ns: str, recall_fn) -> tuple:
+ """Return (recall@1, recall@3) as fractions in [0,1] over PROBES."""
+ at1 = at3 = 0
+ for question, want in PROBES:
+ ids = [h["id"] for h in recall_fn(ns, question, k=3)]
+ if ids[:1] == [want]:
+ at1 += 1
+ if want in ids[:3]:
+ at3 += 1
+ n = len(PROBES)
+ return at1 / n, at3 / n
+
+
# --------------------------------------------------------------------------- #
# The scenario.
# --------------------------------------------------------------------------- #
@@ -148,6 +181,17 @@ def main() -> None:
show(f'== Preference-only recall for: "{q3}"',
recall_vec(ADA, q3, k=5, filt={"term": {"metadata.kind": "preference"}}))
+ # --- Measured recall quality over a labeled probe set. ------------------ #
+ # All 6 memories are still present here (before the forget below).
+ v1, v3 = evaluate_recall(ADA, recall_vec) # semantic (kNN over the vectors)
+ b1, b3 = evaluate_recall(ADA, recall_text) # lexical (BM25 over the text)
+ n = len(PROBES)
+ print(f"\n== Recall quality over {n} labeled probe questions ==")
+ print(f" semantic (kNN): recall@1 = {v1*100:5.1f}% ({round(v1*n)}/{n})"
+ f" recall@3 = {v3*100:5.1f}% ({round(v3*n)}/{n})")
+ print(f" lexical (BM25): recall@1 = {b1*100:5.1f}% ({round(b1*n)}/{n})"
+ f" recall@3 = {b3*100:5.1f}% ({round(b3*n)}/{n})")
+
# --- Isolation: agent-billing cannot see agent-ada's memories. ---------- #
print("\n== Namespace isolation ==")
leak = recall_vec(BILLING, q1, k=3)
diff --git a/docs/examples/anomaly-detection/anomaly_detection.py b/docs/examples/anomaly-detection/anomaly_detection.py
index 3783dd0fa..f7e24d0fd 100644
--- a/docs/examples/anomaly-detection/anomaly_detection.py
+++ b/docs/examples/anomaly-detection/anomaly_detection.py
@@ -13,21 +13,25 @@ index by time, computes the metric per bucket (here mean(cpu)), builds a moving
baseline from prior *normal* buckets, and scores each bucket by how many
standard deviations it sits from that baseline.
-Run: python3 anomaly_detection.py # assumes XERJ on :9486
- XERJ=http://localhost:9200 python3 anomaly_detection.py
+Run: python3 anomaly_detection.py # assumes XERJ on :9200
+ XERJ_URL=http://localhost:9486 python3 anomaly_detection.py
-Uses only the Python 3 standard library. No pip installs.
+Server URL comes from $XERJ_URL (default http://localhost:9200); the legacy
+$XERJ variable is still honored as an alias. Uses only the Python 3 standard
+library. No pip installs, no third-party network calls.
"""
import json
import os
import urllib.request
-XERJ = os.environ.get("XERJ", "http://localhost:9486").rstrip("/")
+XERJ = os.environ.get(
+ "XERJ_URL", os.environ.get("XERJ", "http://localhost:9200")
+).rstrip("/")
INDEX = "cpu_metrics"
JOB = "cpu-spike"
-def req(method, path, body=None, ndjson=False):
+def req(method, path, body=None, ndjson=False, raw=False):
data = None
headers = {}
if ndjson:
@@ -38,7 +42,8 @@ def req(method, path, body=None, ndjson=False):
headers["Content-Type"] = "application/json"
r = urllib.request.Request(XERJ + path, data=data, method=method, headers=headers)
with urllib.request.urlopen(r) as resp:
- return json.loads(resp.read().decode())
+ text = resp.read().decode()
+ return text if raw else json.loads(text)
# 1. Map the index: @timestamp as a date, cpu as a numeric we can average.
@@ -139,3 +144,23 @@ assert spike["anomaly_score"] >= 2 * max_normal, \
spike["anomaly_score"], max_normal)
print("\nOK: spike at 00:12 flagged (score %.1f); %d normal buckets, none flagged"
" (top normal score %.1f)." % (spike["anomaly_score"], len(normals), max_normal))
+
+# 6. The spike record in full — the exact numbers this recipe quotes.
+print("\n== spike record (full precision) ==")
+print(json.dumps({k: spike[k] for k in (
+ "actual", "expected", "std_dev", "z_score",
+ "anomaly_score", "is_anomaly", "timestamp_iso")}, indent=2))
+
+# 7. Re-tune without recreating the job: a stricter 10-sigma gate for this run
+# only. The 65-sigma spike still stands alone.
+strict = req("POST", "/_ml/anomaly_detectors/" + JOB + "/_score",
+ {"anomaly_threshold": 10})
+print("\n== stricter re-score (anomaly_threshold=10) ==")
+print(" anomaly_threshold=%.1f anomaly_count=%d" %
+ (strict["anomaly_threshold"], strict["anomaly_count"]))
+assert strict["anomaly_count"] == 1, \
+ "spike should survive a 10-sigma gate, got count=%d" % strict["anomaly_count"]
+
+# 8. One-line detector listing (_cat plaintext).
+print("\n== _cat/ml/anomaly_detectors ==")
+print(" " + req("GET", "/_cat/ml/anomaly_detectors", raw=True).strip())
diff --git a/docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py b/docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
index e6487388a..a3918a001 100644
--- a/docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
+++ b/docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
@@ -15,8 +15,8 @@ This demo proves the "continuous" part end to end:
3. ingest a SECOND spike into the live index,
4. poll until the background scorer picks it up — with no second _start.
-Run: python3 datafeed_demo.py # assumes XERJ on :9486
- XERJ=http://localhost:9200 python3 datafeed_demo.py
+Run: python3 datafeed_demo.py # assumes XERJ on :9200
+ XERJ_URL=http://localhost:9200 python3 datafeed_demo.py
Uses only the Python 3 standard library. No pip installs.
"""
@@ -29,7 +29,8 @@ import json
import urllib.error
import urllib.request
-XERJ = os.environ.get("XERJ", "http://localhost:9486").rstrip("/")
+# Primary env var is XERJ_URL (default :9200); XERJ is kept as a legacy alias.
+XERJ = os.environ.get("XERJ_URL", os.environ.get("XERJ", "http://localhost:9200")).rstrip("/")
INDEX = "cpu_datafeed"
DETECTOR = "cpu-spike"
DATAFEED = "cpu-spike-feed"
@@ -49,6 +50,13 @@ def call(method, path, body=None):
return json.loads(resp.read())
+def get_text(path):
+ """GET a plain-text endpoint (e.g. the _cat family) and return it stripped."""
+ req = urllib.request.Request(f"{XERJ}{path}", method="GET")
+ with urllib.request.urlopen(req) as resp:
+ return resp.read().decode().strip()
+
+
def ingest(readings):
"""Ingest [(minute, cpu)] as one doc per minute (one reading per bucket)."""
lines = []
@@ -117,7 +125,11 @@ def main():
"frequency": FREQUENCY,
})
print(f"datafeed {feed['datafeed_id']} -> job {feed['job_id']} "
- f"(every {feed['frequency']}), state={feed['state']}\n")
+ f"(every {feed['frequency']}), state={feed['state']}")
+ print(" raw datafeed config:")
+ for line in json.dumps(feed, indent=2, sort_keys=True).splitlines():
+ print(" " + line)
+ print()
# Start it: one scoring pass runs synchronously now, then a background task
# re-scores every `frequency`.
@@ -125,6 +137,12 @@ def main():
first = poll_records(1)
print(f"after _start — {len(first)} anomaly record(s) from the first pass:")
show(first)
+ # Dump the full first record so every field the recipe documents
+ # (timestamp, typical, std_dev, z_score, record_score) is a value THIS run
+ # actually produced — no hand-copied JSON.
+ print("\n raw first record:")
+ for line in json.dumps(first[0], indent=2, sort_keys=True).splitlines():
+ print(" " + line)
# Now the "continuous" part: a NEW spike lands in the live index at minute
# 20. We do NOT touch the datafeed — the running background scorer should
@@ -136,16 +154,29 @@ def main():
print(f"datafeed picked up {len(new)} new anomaly record(s) on its own:")
show(new)
+ # Filter + cap the stored records (section 5 of the recipe).
+ high = call("GET", f"/_ml/anomaly_detectors/{DETECTOR}/results/records?record_score=90")["records"]
+ capped = call("GET", f"/_ml/anomaly_detectors/{DETECTOR}/results/records?size=1")["records"]
+ print(f"\nfilter record_score>=90 -> {len(high)} record(s); size=1 cap -> {len(capped)} record(s)")
+
# Stop the datafeed (idempotent cleanup for re-runs).
stopped = call("POST", f"/_ml/datafeeds/{DATAFEED}/_stop")
fed = call("GET", f"/_ml/datafeeds/{DATAFEED}")["datafeeds"][0]
- print(f"\n_stop -> {stopped} · datafeed state now: {fed['state']}")
+ print(f"_stop -> {stopped} · datafeed state now: {fed['state']}")
+
+ # A stopped datafeed can be deleted; a started one returns 409 (ES parity).
+ cat = get_text("/_cat/ml/datafeeds")
+ print(f"_cat/ml/datafeeds -> {cat!r}")
+ deleted = call("DELETE", f"/_ml/datafeeds/{DATAFEED}")
+ print(f"DELETE datafeed -> {deleted}")
# Verify: both spikes were detected, the second WITHOUT re-starting.
spikes = {when(r): r["actual"] for r in after}
assert any(96.0 == v for v in spikes.values()), "first spike (00:12) missing"
assert any(88.0 == v for v in spikes.values()), "continuously-detected spike (00:20) missing"
assert len(after) >= 2, f"expected >=2 anomaly records, got {len(after)}"
+ assert len(high) == len(after), "record_score>=90 should keep both 100.0-score records"
+ assert len(capped) == 1, "size=1 should cap to a single record"
assert fed["state"] == "stopped", "datafeed did not stop"
print(f"\nOK: {len(after)} anomalies detected continuously; datafeed stopped cleanly.")
diff --git a/docs/examples/hybrid-search/hybrid_search.py b/docs/examples/hybrid-search/hybrid_search.py
index edac4d6e8..afdfe6c5d 100644
--- a/docs/examples/hybrid-search/hybrid_search.py
+++ b/docs/examples/hybrid-search/hybrid_search.py
@@ -17,10 +17,13 @@ embedding model (or use XERJ's semantic_text auto-embedding).
Topic axes: [auth_recovery, security_policy, cooking, generic]
"""
import json
+import os
import sys
import urllib.request
-BASE = "http://localhost:9485"
+# Server URL: XERJ_URL (canonical) or BASE (legacy alias) override the
+# default. No hardcoded port — defaults to the standard ES-compat port.
+BASE = os.environ.get("XERJ_URL") or os.environ.get("BASE") or "http://localhost:9200"
INDEX = "helpdesk"
@@ -121,6 +124,22 @@ print("\nHybrid (BM25 + kNN, RRF fusion):")
table(hyb)
hyb_ids = ids(hyb)
+# Trimmed view of the ACTUAL fused response — this is what the recipe docs
+# quote, so print it verbatim from the run (nothing hand-edited).
+trimmed = {
+ "hits": {
+ "total": hyb["hits"]["total"],
+ "max_score": round(hyb["hits"]["max_score"], 5),
+ "hits": [
+ {"_id": h["_id"], "_score": round(h["_score"], 5),
+ "_source": {"title": h["_source"]["title"]}}
+ for h in hyb["hits"]["hits"]
+ ],
+ }
+}
+print("\nHybrid response (trimmed to title):")
+print(json.dumps(trimmed, indent=2))
+
# ---- 4. Prove the point --------------------------------------------------
print("\n--- assertions ---")
# d2 is relevant (account recovery) but shares NO keywords -> BM25 can't see it
diff --git a/docs/examples/log-analytics/log_analytics.py b/docs/examples/log-analytics/log_analytics.py
index 4c88baacd..2c1858da0 100644
--- a/docs/examples/log-analytics/log_analytics.py
+++ b/docs/examples/log-analytics/log_analytics.py
@@ -11,12 +11,18 @@ real operational questions with Elasticsearch-style aggregations:
Stdlib only (urllib + json). No pip installs. Point it at a live XERJ.
"""
import json
+import os
import random
import sys
import urllib.request
from datetime import datetime, timedelta, timezone
-BASE = sys.argv[1] if len(sys.argv) > 1 else "http://localhost:9483"
+# Server URL resolution (no un-overridable hardcoded port):
+# 1. explicit argv[1] (documented positional form)
+# 2. $XERJ_URL environment variable (uniform across all recipes)
+# 3. http://localhost:9200 (XERJ's default es_compat_port)
+BASE = (sys.argv[1] if len(sys.argv) > 1
+ else os.environ.get("XERJ_URL", "http://localhost:9200"))
INDEX = "logs-app"
@@ -113,6 +119,7 @@ r = req("POST", "/" + INDEX + "/_search", {
}
}
})
+print(f"(took={r.get('took')} ms)")
print(f"{'hour (UTC)':<22}{'total':>8}{'errors':>8}{'err_rate':>10}")
for b in r["aggregations"]["per_hour"]["buckets"]:
total = b["doc_count"]
@@ -139,6 +146,8 @@ r = req("POST", "/" + INDEX + "/_search", {
}
})
pct = r["aggregations"]["latency"]["values"]
+raw = " ".join(f"{k}={v:.2f}" for k, v in sorted(pct.items(), key=lambda kv: float(kv[0])))
+print(f"(took={r.get('took')} ms; raw percentiles: {raw})")
print(f"fleet-wide p50={pct['50.0']:.0f} p95={pct['95.0']:.0f} p99={pct['99.0']:.0f}")
print(f"{'service':<12}{'p95 latency':>14}")
for b in r["aggregations"]["by_service"]["buckets"]:
diff --git a/docs/examples/migrate-from-elasticsearch/migrate_demo.sh b/docs/examples/migrate-from-elasticsearch/migrate_demo.sh
index b4faca7ab..5068e6837 100755
--- a/docs/examples/migrate-from-elasticsearch/migrate_demo.sh
+++ b/docs/examples/migrate-from-elasticsearch/migrate_demo.sh
@@ -5,12 +5,15 @@
# point it at XERJ's wire port and every request below is byte-for-byte
# the same JSON you'd send Elasticsearch.
#
-# ES=http://localhost:9487 ./migrate_demo.sh
+# ES=http://localhost:9200 ./migrate_demo.sh
#
-# Requires: curl, and (for pretty output) python3 — both stdlib-only.
+# Requires: curl, and python3 (both stdlib-only — the python is just a JSON
+# pretty-printer; no third-party packages, no network calls of its own).
set -euo pipefail
-ES="${ES:-http://localhost:9200}" # <-- the ONE thing you change to migrate
+# The ONE thing you change to migrate. ES is the documented knob; XERJ_URL is
+# accepted as an alias so the same script drops into XERJ's own tooling.
+ES="${ES:-${XERJ_URL:-http://localhost:9200}}"
IDX=products
pp() { python3 -m json.tool; } # pretty-print JSON from stdin
@@ -49,26 +52,27 @@ curl -s -X POST "$ES/_bulk" \
{"name":"Ceramic coffee mug","brand":"Bodum","price":12.00,"in_stock":true}
{"index":{"_index":"products","_id":"6"}}
{"name":"Plastic sports bottle","brand":"Klean","price":9.99,"in_stock":false}
-' | python3 -c 'import sys,json; d=json.load(sys.stdin); print("errors:",d["errors"],"items:",len(d["items"]))'
+' | python3 -c 'import sys,json; d=json.load(sys.stdin); print("errors:", str(d["errors"]).lower(), " items:", len(d["items"]))'
# Make freshly-indexed docs searchable (ES semantics: refresh).
curl -s -X POST "$ES/$IDX/_refresh" >/dev/null
# 3) match query — full-text search on the analyzed "name" field.
-say "3. _search match: name ~ \"water bottle\""
+say '3. _search match: name ~ "water bottle"'
curl -s "$ES/$IDX/_search" -H 'Content-Type: application/json' -d '{
"query": { "match": { "name": "water bottle" } },
"_source": ["name","brand","price"]
}' | python3 -c '
-import sys,json
-d=json.load(sys.stdin)
-print("total:", d["hits"]["total"]["value"])
-for h in d["hits"]["hits"]:
- print(f" {h[_SCORE]:.3f} {h[_SRC][NAME]}".replace("_SCORE",chr(39)+"_score"+chr(39)).replace("_SRC",chr(39)+"_source"+chr(39)).replace("NAME",chr(39)+"name"+chr(39)))
-' 2>/dev/null || curl -s "$ES/$IDX/_search" -H 'Content-Type: application/json' -d '{"query":{"match":{"name":"water bottle"}},"_source":["name"]}' | pp
+import sys, json
+d = json.load(sys.stdin)
+h = d["hits"]
+print("total:", h["total"]["value"], " max_score:", round(h["max_score"], 4))
+for hit in h["hits"]:
+ print(" %.3f %s" % (hit["_score"], hit["_source"]["name"]))
+'
# 4) bool query: must match + term filter + range filter — the classic ES combo.
-say "4. _search bool: match \"bottle\" AND brand=Hydro-or-Klean AND price 10..40"
+say '4. _search bool: match "bottle" AND brand=Hydro-or-Klean AND price 10..40'
curl -s "$ES/$IDX/_search" -H 'Content-Type: application/json' -d '{
"query": {
"bool": {
@@ -80,7 +84,15 @@ curl -s "$ES/$IDX/_search" -H 'Content-Type: application/json' -d '{
}
},
"_source": ["name","brand","price"]
-}' | pp
+}' | python3 -c '
+import sys, json
+d = json.load(sys.stdin)
+h = d["hits"]
+print("total:", h["total"]["value"])
+for hit in h["hits"]:
+ s = hit["_source"]
+ print(" %-6s %6.2f %s" % (s["brand"], s["price"], s["name"]))
+'
# 5) terms aggregation — count products per brand (no query hits, just the agg).
say "5. _search terms agg: products per brand"
@@ -89,11 +101,26 @@ curl -s "$ES/$IDX/_search" -H 'Content-Type: application/json' -d '{
"aggs": {
"by_brand": { "terms": { "field": "brand" } }
}
-}' | pp
+}' | python3 -c '
+import sys, json
+d = json.load(sys.stdin)
+print("total docs:", d["hits"]["total"]["value"])
+agg = d["aggregations"]["by_brand"]
+print("doc_count_error_upper_bound:", agg["doc_count_error_upper_bound"],
+ " sum_other_doc_count:", agg["sum_other_doc_count"])
+for b in agg["buckets"]:
+ print(" %-6s %d" % (b["key"], b["doc_count"]))
+'
# 6) _cat/indices — operational sanity check, human-readable table.
-say "6. GET /_cat/indices?v"
+# Note: XERJ serves the whole-cluster _cat/indices listing (which also
+# includes its .xerj_* system indices). It does NOT serve the per-index
+# _cat/indices/<name> path (404), so filter client-side as shown.
+say "6. GET /_cat/indices?v (ops table — includes .xerj_* system indices)"
curl -s "$ES/_cat/indices?v"
+echo
+echo "--- your index only (client-side filter) ---"
+curl -s "$ES/_cat/indices?v" | grep -E ' products ' || true
echo
echo "All standard Elasticsearch calls succeeded against XERJ at $ES"
diff --git a/docs/examples/passage-retrieval/passage_demo.py b/docs/examples/passage-retrieval/passage_demo.py
index 0866261ee..cd73e88bd 100644
--- a/docs/examples/passage-retrieval/passage_demo.py
+++ b/docs/examples/passage-retrieval/passage_demo.py
@@ -24,7 +24,8 @@ Both arms use XERJ's own server-side embedder (the pooled baseline reuses
XERJ's ``<field>_vector`` read back out of ``_source``), so the only variable
is pooled-vs-per-passage. We report how often the compendium reaches the top-3.
-Run: python3 recipes/passage_search.py (honors $XERJ_URL, default :9200)
+Run: python3 docs/examples/passage-retrieval/passage_demo.py
+ (honors $XERJ_URL, default http://localhost:9200)
"""
import json
import os
@@ -34,10 +35,34 @@ import urllib.request
URL = os.environ.get("XERJ_URL", "http://localhost:9200").rstrip("/")
HERE = os.path.dirname(os.path.abspath(__file__))
-KB = os.path.join(HERE, "..", "demo", "data", "ai_kb.ndjson")
TOPK = 3
+def _find_kb():
+ """Locate demo/data/ai_kb.ndjson robustly.
+
+ Honors $XERJ_KB if set; otherwise walks up from this file to the repo
+ root that holds demo/data/ai_kb.ndjson (works no matter how deep the
+ example lives under the tree)."""
+ env = os.environ.get("XERJ_KB")
+ if env:
+ return env
+ d = HERE
+ for _ in range(8):
+ cand = os.path.join(d, "demo", "data", "ai_kb.ndjson")
+ if os.path.exists(cand):
+ return cand
+ parent = os.path.dirname(d)
+ if parent == d:
+ break
+ d = parent
+ # Documented repo-relative fallback (docs/examples/<recipe>/ → repo root).
+ return os.path.join(HERE, "..", "..", "..", "demo", "data", "ai_kb.ndjson")
+
+
+KB = _find_kb()
+
+
def req(method, path, body=None, quiet=False):
data = json.dumps(body).encode() if body is not None else None
r = urllib.request.Request(
diff --git a/docs/examples/semantic-search-rag/rag_demo.py b/docs/examples/semantic-search-rag/rag_demo.py
index de58f7322..93850a195 100644
--- a/docs/examples/semantic-search-rag/rag_demo.py
+++ b/docs/examples/semantic-search-rag/rag_demo.py
@@ -7,10 +7,11 @@ ingest, zero external config), then retrieves passages by *meaning* using the
`semantic` query. The retrieved passages are the chunks you'd hand to an LLM as
grounding context for RAG.
-Stdlib only (urllib + json). Point BASE at a running XERJ es_compat port.
+Stdlib only (urllib + json). Point XERJ_URL at a running XERJ es_compat port.
- python3 rag_demo.py # defaults to http://localhost:9482
- BASE=http://localhost:9200 python3 rag_demo.py
+ python3 rag_demo.py # defaults to http://localhost:9200
+ XERJ_URL=http://localhost:9482 python3 rag_demo.py
+ BASE=http://localhost:9482 python3 rag_demo.py # BASE still works (alias)
"""
import json
import os
@@ -19,7 +20,8 @@ import time
import urllib.request
import urllib.error
-BASE = os.environ.get("BASE", "http://localhost:9482")
+# Server URL: XERJ_URL is canonical; BASE kept as a documented alias; default :9200.
+BASE = os.environ.get("XERJ_URL") or os.environ.get("BASE") or "http://localhost:9200"
INDEX = "kb"
@@ -131,6 +133,12 @@ def main():
context = "\n\n".join(
f"[{h['_id']}] {h['_source']['title']}\n{h['_source']['body']}" for h in hits
)
+ # Raw shape of the top hit — the exact score + companion vector the doc quotes.
+ top = hits[0]
+ vec = top["_source"].get("body_vector", [])
+ print("\n=== RAW TOP HIT (exact score + companion vector) ===")
+ print(f"query={q!r} top={top['_id']} score={top['_score']!r} "
+ f"dims={len(vec)} body_vector[:3]={vec[:3]} order={[h['_id'] for h in hits]}")
print("\n=== RAG CONTEXT BUNDLE (top-2 passages -> LLM prompt) ===")
print(f"User question: {q}\n")
print("Retrieved context:\n" + context)
@@ -156,6 +164,39 @@ def main():
print(f" semantic top -> {sm[0]['_id']} {sm[0]['_source']['title']} "
f"(expected kb-1; the body never uses the word 'rotate')")
+ # 7) Score the ranking with _rank_eval — real IR metrics over the real KB.
+ # kb-1 is the one relevant answer to the regenerate-token question; each
+ # metric scores the SAME semantic ranking a different way.
+ print("\n=== RANK EVAL (real IR metrics on this KB, ES wire API) ===")
+ request = {
+ "id": "regen_token_q",
+ "request": {"query": {"semantic": {"field": "body",
+ "query": "how do I regenerate my API token", "k": 3}}},
+ "ratings": [
+ {"_id": "kb-1", "rating": 3},
+ {"_id": "kb-5", "rating": 0},
+ {"_id": "kb-2", "rating": 0},
+ ],
+ }
+ metrics = {
+ "dcg (nDCG@3)": {"dcg": {"k": 3, "normalize": True}},
+ "precision@3": {"precision": {"k": 3}},
+ "recall@3": {"recall": {"k": 3}},
+ "mean_reciprocal_rank": {"mean_reciprocal_rank": {"k": 3}},
+ }
+ rank_scores = {}
+ for label, metric in metrics.items():
+ status, resp = req("POST", f"/{INDEX}/_rank_eval",
+ {"metric": metric, "requests": [request]})
+ assert status == 200, resp
+ score = resp.get("metric_score")
+ rank_scores[label] = score
+ print(f" {label:22} metric_score={score}")
+ # An unknown metric name must fail loud (400), not return a misleading number.
+ status, resp = req("POST", f"/{INDEX}/_rank_eval",
+ {"metric": {"not_a_metric": {"k": 3}}, "requests": [request]})
+ print(f" unknown-metric -> HTTP {status} (expected 400, fail-loud)")
+
print(f"\nRESULT: {passed}/{len(checks)} semantic retrievals returned the right doc at rank 1")
if passed != len(checks):
sys.exit(1)
diff --git a/docs/examples/vector-quantization/quant_demo.py b/docs/examples/vector-quantization/quant_demo.py
index 256cf6085..1bdd79d0b 100644
--- a/docs/examples/vector-quantization/quant_demo.py
+++ b/docs/examples/vector-quantization/quant_demo.py
@@ -15,13 +15,18 @@ shows that:
1. kNN returns the same top results from both,
2. recall@10 of the quantized index vs the exact index stays >= 0.90,
- 3. the quantized field's vector footprint is 4x smaller (1 vs 4 bytes/dim).
+ 3. the quantized field's vector footprint is 4x smaller — MEASURED by
+ actually encoding every vector as float32 bytes vs int8 bytes and
+ comparing the real byte totals (not a hardcoded ratio).
Usage:
xerj --insecure --data-dir ./data & # start XERJ
- python3 recipes/vector_quantization.py
+ python3 docs/examples/vector-quantization/quant_demo.py
- XERJ_URL (default http://localhost:9200)
+Environment:
+ XERJ_URL server URL (default http://localhost:9200)
+ XERJ_KB path to ai_kb.ndjson (default: auto-discovered by walking up
+ from this script to the repo's demo/data/ai_kb.ndjson)
"""
import hashlib
@@ -29,16 +34,34 @@ import json
import math
import os
import pathlib
+import struct
import urllib.error
import urllib.request
XERJ = os.environ.get("XERJ_URL", "http://localhost:9200")
-KB = pathlib.Path(__file__).resolve().parent.parent / "demo" / "data" / "ai_kb.ndjson"
DIM = 128
NONE_INDEX = "vq-none"
SQ8_INDEX = "vq-scalar8"
+def _find_kb():
+ """Locate demo/data/ai_kb.ndjson robustly, regardless of where this copy
+ of the script lives (docs/examples/... or recipes/...). Honours XERJ_KB."""
+ env = os.environ.get("XERJ_KB")
+ if env:
+ return pathlib.Path(env)
+ here = pathlib.Path(__file__).resolve()
+ for base in (here.parent, *here.parents):
+ cand = base / "demo" / "data" / "ai_kb.ndjson"
+ if cand.exists():
+ return cand
+ # Fall back to the original relative guess so the error message is useful.
+ return here.parent.parent / "demo" / "data" / "ai_kb.ndjson"
+
+
+KB = _find_kb()
+
+
def call(method, path, body=None):
"""One tiny HTTP helper instead of a client library."""
data = None
@@ -102,6 +125,17 @@ def knn(name, qv, k=10):
return [(h["_id"], h["_score"]) for h in r["hits"]["hits"]]
+def encode_f32(vec):
+ """Exact wire size of a full-precision vector: 4 bytes per dimension."""
+ return struct.pack(f"<{len(vec)}f", *vec)
+
+
+def encode_i8(vec):
+ """Scalar8 code: symmetric int8 quantization → 1 byte per dimension.
+ (Cosine vectors are already L2-normalised, so |x| <= 1.)"""
+ return bytes((max(-127, min(127, round(x * 127))) & 0xFF) for x in vec)
+
+
def main():
# ── 1. Embed the real KB into 128-dim vectors. ───────────────────────
docs = []
@@ -137,8 +171,22 @@ def main():
hits += len(exact & approx)
total += len(exact)
recall = hits / total if total else 0.0
+
+ # ── 5. Measure the real byte footprint of each encoding. ─────────────
+ # Encode every corpus vector both ways and compare the actual byte totals
+ # — this is a genuine measurement, not a stipulated 4x.
+ f32_total = sum(len(encode_f32(d["v"])) for d in docs)
+ i8_total = sum(len(encode_i8(d["v"])) for d in docs)
+ ratio = f32_total / i8_total if i8_total else 0.0
+ f32_per = f32_total // len(docs)
+ i8_per = i8_total // len(docs)
+
print(f"recall@10 (scalar8 vs float32 ground truth): {recall:.3f}")
- print(f"vector footprint: float32 = {DIM * 4} B/vec → scalar8 = {DIM} B/vec (4x smaller)")
+ print(
+ f"vector footprint over {len(docs)} vecs: "
+ f"float32 = {f32_total} B ({f32_per} B/vec) → "
+ f"scalar8 = {i8_total} B ({i8_per} B/vec) ({ratio:.2f}x smaller)"
+ )
if recall < 0.90:
raise SystemExit(f"FAIL: recall {recall:.3f} < 0.90")
print("\nOK — 4x smaller vectors, recall preserved. `_source` still holds the originals.")
diff --git a/docs/examples/vector-search-knn/knn_demo.py b/docs/examples/vector-search-knn/knn_demo.py
index 03cd67d0c..8b8cb9c93 100644
--- a/docs/examples/vector-search-knn/knn_demo.py
+++ b/docs/examples/vector-search-knn/knn_demo.py
@@ -20,10 +20,14 @@ and never a truck. That's the recall check.
No external deps: Python 3 stdlib only (urllib + json).
"""
import json
+import math
+import os
import urllib.request
import urllib.error
-BASE = "http://localhost:9484"
+# Server URL: XERJ_URL wins, then the older BASE alias, else the default port.
+# No un-overridable hardcoded port — point it anywhere with `XERJ_URL=...`.
+BASE = os.environ.get("XERJ_URL") or os.environ.get("BASE") or "http://localhost:9200"
INDEX = "catalog"
@@ -54,6 +58,32 @@ def hits(resp):
return out
+def cosine(a, b):
+ dot = sum(x * y for x, y in zip(a, b))
+ na = math.sqrt(sum(x * x for x in a))
+ nb = math.sqrt(sum(y * y for y in b))
+ return dot / (na * nb) if na and nb else 0.0
+
+
+def exact_topk(query_vec, catalog, k, only=None):
+ """Ground-truth top-k ids by brute-force exact cosine over the full catalog.
+ `only` optionally restricts to a predicate over (id,name,cat,stock,vec)."""
+ scored = [
+ (_id, cosine(query_vec, vec))
+ for (_id, name, cat, stock, vec) in catalog
+ if only is None or only(_id, name, cat, stock, vec)
+ ]
+ scored.sort(key=lambda t: t[1], reverse=True)
+ return [i for i, _ in scored[:k]]
+
+
+def recall_at_k(returned_ids, exact_ids):
+ """Fraction of the true top-k that the ANN search actually returned."""
+ if not exact_ids:
+ return 1.0
+ return len(set(returned_ids) & set(exact_ids)) / len(exact_ids)
+
+
# ── 1. Fresh index with a dense_vector field ───────────────────────
req("DELETE", "/" + INDEX)
status, _ = req("PUT", "/" + INDEX, {
@@ -101,10 +131,17 @@ for h in knn_hits:
top3_ids = [h[0] for h in knn_hits]
top3_cats = [h[3] for h in knn_hits]
-# RECALL CHECK: the 3 nearest MUST be the 3 citrus fruits (ids 1,2,3),
-# and NO vehicle should appear.
+# RECALL CHECK: compare the ANN (HNSW) result against the brute-force exact
+# top-k computed independently in this script — that's the real recall@k.
+exact3 = exact_topk(query_vec, catalog, 3)
+recall3 = recall_at_k(top3_ids, exact3)
+print(" exact top-3 (brute-force cosine):", exact3)
+print(" recall@3 = %.3f (%d/%d of the true nearest returned)"
+ % (recall3, round(recall3 * 3), 3))
+# The 3 nearest MUST be the 3 citrus fruits (ids 1,2,3), and NO vehicle.
assert set(top3_ids) == {"1", "2", "3"}, top3_ids
assert all(c == "fruit" for c in top3_cats), top3_cats
+assert recall3 == 1.0, (top3_ids, exact3) # ANN == exact on this corpus
# Cosine similarity of near-identical direction should be ~1.0.
assert knn_hits[0][1] > 0.99, knn_hits[0]
print(" OK: top-3 are exactly the citrus fruits, no vehicles leaked in")
@@ -147,10 +184,21 @@ status, resp = req("POST", "/%s/_search" % INDEX, {
"knn": {"field": "embedding", "query_vector": [0.0, 0.0, 0.9, 0.85], "k": 2, "num_candidates": 10}
})
print("\n=== kNN k=2, query ~vehicle ===")
+veh_query = [0.0, 0.0, 0.9, 0.85]
veh = hits(resp)
for h in veh:
print(" ", h)
+veh_ids = [h[0] for h in veh]
+exact_veh = exact_topk(veh_query, catalog, 2)
+recall_veh = recall_at_k(veh_ids, exact_veh)
+print(" exact top-2 (brute-force cosine):", exact_veh)
+print(" recall@2 = %.3f" % recall_veh)
assert all(h[3] == "vehicle" for h in veh), veh
+assert recall_veh == 1.0, (veh_ids, exact_veh)
print(" OK: vehicle query returns only vehicles")
-print("\nALL ASSERTIONS PASSED")
+# Overall: HNSW matched brute-force exact on every query in this run.
+overall = (recall3 + recall_veh) / 2
+print("\nMEASURED recall vs brute-force exact across queries: %.3f (%s)"
+ % (overall, "exact" if overall == 1.0 else "approximate"))
+print("ALL ASSERTIONS PASSED")
diff --git a/docs/recipes/agentic-memory.md b/docs/recipes/agentic-memory.md
index 37b1162f9..e0ec81321 100644
--- a/docs/recipes/agentic-memory.md
+++ b/docs/recipes/agentic-memory.md
@@ -59,7 +59,7 @@ that is how isolation stays clean.
### Storing a memory (raw wire)
```bash
-curl -XPOST localhost:9481/_memory/agent-ada -H 'content-type: application/json' -d '{
+curl -XPOST localhost:9200/_memory/agent-ada -H 'content-type: application/json' -d '{
"text": "The team prefers Rust over Go for new backend services.",
"vector": [0.12, 0.0, 0.34],
"metadata": {"kind": "preference", "topic": "language"},
@@ -73,7 +73,7 @@ curl -XPOST localhost:9481/_memory/agent-ada -H 'content-type: application/json'
### Recalling by vector, filtered to preferences (raw wire)
```bash
-curl -XPOST localhost:9481/_memory/agent-ada/_recall -H 'content-type: application/json' -d '{
+curl -XPOST localhost:9200/_memory/agent-ada/_recall -H 'content-type: application/json' -d '{
"vector": [0.12, 0.0, 0.34],
"k": 2,
"filter": {"term": {"metadata.kind": "preference"}}
@@ -111,13 +111,16 @@ trigrams) so the demo needs no model download and cosine similarity is meaningfu
#!/usr/bin/env python3
"""Long-term memory for an AI agent, backed by XERJ's /_memory API."""
+import os
import json
import math
import re
import urllib.request
from urllib.error import HTTPError
-BASE = "http://localhost:9481"
+# Server URL: read XERJ_URL (or the legacy BASE alias); default to the stock
+# XERJ port 9200. No un-overridable hardcoded port -- point this at any node.
+BASE = os.environ.get("XERJ_URL") or os.environ.get("BASE") or "http://localhost:9200"
DIM = 96 # embedding dimensionality for the toy hashing embedder
@@ -173,6 +176,27 @@ def show(label, hits):
print(f" [{h['score']:.3f}] ({kind:10}) {h['text']}")
+# Quantified recall quality: probe questions each labeled with the one memory
+# that answers them, scored by recall@1 / recall@3 -- MEASURED, not eyeballed.
+PROBES = [
+ ("What language should we choose for a new backend service?", "ada-1"),
+ ("Which region is production deployed in?", "ada-2"),
+ ("Are we using tabs or spaces, and what line width?", "ada-3"),
+ ("Which service owns the Postgres ledger database?", "ada-4"),
+ ("What has to pass in CI before a deploy?", "ada-5"),
+ ("What do we use for tracing?", "ada-6"),
+]
+
+def evaluate_recall(ns, recall_fn):
+ at1 = at3 = 0
+ for question, want in PROBES:
+ ids = [h["id"] for h in recall_fn(ns, question, k=3)]
+ at1 += ids[:1] == [want]
+ at3 += want in ids[:3]
+ n = len(PROBES)
+ return at1 / n, at3 / n
+
+
def main():
ADA, BILLING = "agent-ada", "agent-billing"
drop(ADA); drop(BILLING) # clean slate for a repeatable demo
@@ -208,6 +232,16 @@ def main():
show(f'== Preference-only recall for: "{q3}"',
recall_vec(ADA, q3, k=5, filt={"term": {"metadata.kind": "preference"}}))
+ # Measured recall quality (all 6 memories still present, before the forget).
+ v1, v3 = evaluate_recall(ADA, recall_vec) # semantic (kNN over the vectors)
+ b1, b3 = evaluate_recall(ADA, recall_text) # lexical (BM25 over the text)
+ n = len(PROBES)
+ print(f"\n== Recall quality over {n} labeled probe questions ==")
+ print(f" semantic (kNN): recall@1 = {v1*100:5.1f}% ({round(v1*n)}/{n})"
+ f" recall@3 = {v3*100:5.1f}% ({round(v3*n)}/{n})")
+ print(f" lexical (BM25): recall@1 = {b1*100:5.1f}% ({round(b1*n)}/{n})"
+ f" recall@3 = {b3*100:5.1f}% ({round(b3*n)}/{n})")
+
print("\n== Namespace isolation ==")
leak = recall_vec(BILLING, q1, k=3)
billing_texts = [h["text"] for h in leak]
@@ -237,19 +271,37 @@ if __name__ == "__main__":
---
-## Run it
+## Reproduce it yourself
-Start XERJ (single node, no TLS/auth) and run the script:
+Start XERJ (single node, no TLS/auth) on its default port and run the script.
+Nothing to install — the client is Python 3 **stdlib only**.
```bash
-# 1. boot XERJ
-printf '[server]\nes_compat_port = 9481\n' > /tmp/xerj.toml
-./engine/target/release/xerj --insecure --data-dir /tmp/xerj-mem --config /tmp/xerj.toml &
+# 1. boot XERJ on the default port 9200
+./engine/target/release/xerj --insecure --data-dir /tmp/xerj-mem &
-# 2. run the agent
+# 2. run the agent (defaults to http://localhost:9200)
python3 docs/examples/agentic-memory/agent_memory.py
+
+# Point it at a different node/port with XERJ_URL if you like:
+# XERJ_URL=http://localhost:9481 python3 docs/examples/agentic-memory/agent_memory.py
```
+**What a customer should see.** The client exits `0` and prints `All assertions
+passed.`. The recall-quality line is the headline number, and it is
+**deterministic** — the toy embedder and BM25 are fixed functions of this
+corpus, so the values below reproduce exactly, run to run:
+
+- **Semantic (kNN):** recall@1 = **83.3% (5/6)**, recall@3 = **100% (6/6)**
+- **Lexical (BM25):** recall@1 = **100% (6/6)**, recall@3 = **100% (6/6)**
+
+The single semantic recall@1 miss is honest and instructive: on *"Which region
+is production deployed in?"* the toy trigram embedder scores *"**Deploys** are
+gated on CI…"* (0.790) a hair above the correct *"**Production** runs on AWS…"*
+(0.780) — shared `deploy`/`Deploys` character trigrams. The right memory is still
+in the top 3, and **BM25 recalls it first (6/6)**, which is exactly why the recipe
+offers both recall paths.
+
### Real output
```text
@@ -275,6 +327,10 @@ python3 docs/examples/agentic-memory/agent_memory.py
[0.692] (preference) The team prefers tabs over spaces and a 100-column line limit.
[0.666] (preference) The team prefers OpenTelemetry for tracing, not vendor SDKs.
+== Recall quality over 6 labeled probe questions ==
+ semantic (kNN): recall@1 = 83.3% (5/6) recall@3 = 100.0% (6/6)
+ lexical (BM25): recall@1 = 100.0% (6/6) recall@3 = 100.0% (6/6)
+
== Namespace isolation ==
agent-billing recall for a coding question -> ['Invoices over $10k require CFO approval.']
OK: agent-billing only ever sees its own namespace.
@@ -304,6 +360,9 @@ Read the run top to bottom:
- **BM25 recall** answered the region question exactly, no vectors involved.
- **Preference-only recall** returned three memories, *all* `kind:"preference"` —
the `metadata.kind` filter did its job.
+- **Recall quality** over the 6 labeled probes is measured, not asserted by hand:
+ BM25 recall@1 = 6/6, semantic recall@1 = 5/6, both recall@3 = 6/6 — a real number
+ this run computed and printed.
- **Isolation** held: `agent-billing`, asked a coding question, only saw its own
single finance memory.
- **Forgetting** removed `ada-6` (the tracing preference); the follow-up recall no
@@ -321,8 +380,12 @@ Read the run top to bottom:
- **Vector *or* text.** A memory needs at least `text` or a `vector`. Text is always
BM25-indexed; a vector additionally enables kNN recall. Recall with `vector` uses
kNN; without it, `query` uses BM25.
-- **Recency.** The store blends similarity with a recency signal internally, so
- fresh memories surface even when marginally less similar — useful for agents whose
+- **Recency (opt-in).** Recall is pure relevance by default. Pass `recency_weight`
+ in `[0, 1]` on `_recall` to blend recency: the engine over-fetches candidates and
+ re-ranks by `(1 - w) * norm_relevance + w * norm_recency` (both min-max normalized
+ across the candidate set), so `w = 1` surfaces the newest memory, `w = 0` is exactly
+ the default relevance order. Verified: two same-vector memories tie on relevance;
+ with `recency_weight: 1.0` the newer one is returned first. Useful when an agent's
latest observation should win ties.
- **Isolation is structural, not a filter.** Namespaces are separate physical
indices, so there is no query you can write in one namespace that reads another.
diff --git a/docs/recipes/anomaly-detection.md b/docs/recipes/anomaly-detection.md
index 34464a9a8..6ee393c41 100644
--- a/docs/recipes/anomaly-detection.md
+++ b/docs/recipes/anomaly-detection.md
@@ -35,7 +35,7 @@ The time field must be a `date`; the metric must be numeric so the detector can
average it.
```bash
-curl -XPUT localhost:9486/cpu_metrics -H 'Content-Type: application/json' -d '{
+curl -XPUT localhost:9200/cpu_metrics -H 'Content-Type: application/json' -d '{
"mappings": { "properties": {
"@timestamp": { "type": "date" },
"host": { "type": "keyword" },
@@ -65,7 +65,7 @@ is the z-score gate (defaults to `3.0` — a bucket is flagged when it sits more
than 3σ from the baseline).
```bash
-curl -XPUT localhost:9486/_ml/anomaly_detectors/cpu-spike \
+curl -XPUT localhost:9200/_ml/anomaly_detectors/cpu-spike \
-H 'Content-Type: application/json' -d '{
"source_index": "cpu_metrics",
"time_field": "@timestamp",
@@ -98,7 +98,7 @@ great for request/error rate), `mean`/`avg`, `min`, `max`, `sum`.
## 4. Score it
```bash
-curl -XPOST localhost:9486/_ml/anomaly_detectors/cpu-spike/_score
+curl -XPOST localhost:9200/_ml/anomaly_detectors/cpu-spike/_score
```
XERJ returns the whole timeline plus a ranked `anomalies` list. Rendered per
@@ -172,7 +172,7 @@ The spike record in full:
```bash
# Same data, stricter gate (10σ) — the 65σ spike still stands alone.
-curl -XPOST localhost:9486/_ml/anomaly_detectors/cpu-spike/_score \
+curl -XPOST localhost:9200/_ml/anomaly_detectors/cpu-spike/_score \
-H 'Content-Type: application/json' -d '{"anomaly_threshold": 10}'
# -> "anomaly_threshold": 10.0, "anomaly_count": 1
```
@@ -187,24 +187,57 @@ response shape.
## List detectors
```bash
-curl localhost:9486/_cat/ml/anomaly_detectors
+curl localhost:9200/_cat/ml/anomaly_detectors
# cpu-spike opened cpu_metrics mean 1m
```
`GET /_ml/anomaly_detectors/{id}` and `DELETE /_ml/anomaly_detectors/{id}` round
out lifecycle management.
-## Run it
+## Reproduce it yourself
+
+Start XERJ on its default port (`9200`) and run the example — no keys, no
+external services, stdlib Python only:
```bash
-# XERJ listening on :9486 (adjust XERJ=... for another port)
+# 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
python3 docs/examples/anomaly-detection/anomaly_detection.py
```
+Point it at a non-default host/port with `XERJ_URL=http://host:port` (the legacy
+`XERJ=...` variable still works as an alias). The data is generated in-script
+with a fixed spike, so every run prints the same numbers:
+
+```
+== detector created ==
+{ "job_id": "cpu-spike", "function": "mean", "bucket_span": "1m", "anomaly_threshold": 3.0 }
+
+00:12:00 96.0 20.2 65.1 100.0 *** <- the spike
+
+== anomalies (1 of 16 buckets) ==
+ 2026-07-06T00:12:00.000Z actual=96.0 expected=20.2 z=65.1 score=100.0
+
+OK: spike at 00:12 flagged (score 100.0); 11 normal buckets, none flagged (top normal score 48.0).
+
+== spike record (full precision) ==
+{ "actual": 96.0, "expected": 20.25, "std_dev": 1.1636866703140785,
+ "z_score": 65.09484205018445, "anomaly_score": 100.0, "is_anomaly": true }
+
+== stricter re-score (anomaly_threshold=10) ==
+ anomaly_threshold=10.0 anomaly_count=1
+
+== _cat/ml/anomaly_detectors ==
+ cpu-spike opened cpu_metrics mean 1m
+```
+
The script maps the index, ingests the series with the injected spike, creates
the detector, scores it, prints the table above, and **asserts** the result:
-exactly one anomaly, at 00:12, score 100, mean 96 — and no normal bucket
-flagged. It exits non-zero if any of that regresses, so it doubles as a
+exactly one anomaly, at 00:12, score 100.0, mean 96.0, 65σ out — and no normal
+bucket flagged (the spike's score is 100.0 vs. a top normal of 48.0, clean
+separation). It exits non-zero if any of that regresses, so it doubles as a
smoke test.
## Endpoint cheat-sheet
diff --git a/docs/recipes/continuous-anomaly-datafeeds.md b/docs/recipes/continuous-anomaly-datafeeds.md
index e62b8a3f8..12893bc2d 100644
--- a/docs/recipes/continuous-anomaly-datafeeds.md
+++ b/docs/recipes/continuous-anomaly-datafeeds.md
@@ -39,14 +39,14 @@ The time field must be a `date`; the metric must be numeric. The detector is the
same object as in the on-demand recipe: `mean(cpu)` over one-minute buckets.
```bash
-curl -XPUT localhost:9486/cpu_datafeed -H 'Content-Type: application/json' -d '{
+curl -XPUT localhost:9200/cpu_datafeed -H 'Content-Type: application/json' -d '{
"mappings": { "properties": {
"@timestamp": { "type": "date" },
"cpu": { "type": "double" }
}}
}'
-curl -XPUT localhost:9486/_ml/anomaly_detectors/cpu-spike \
+curl -XPUT localhost:9200/_ml/anomaly_detectors/cpu-spike \
-H 'Content-Type: application/json' -d '{
"source_index": "cpu_datafeed",
"time_field": "@timestamp",
@@ -64,7 +64,7 @@ A datafeed needs a `job_id` (which must reference an existing detector — else
to `>= 1s`, default `60s`).
```bash
-curl -XPUT localhost:9486/_ml/datafeeds/cpu-spike-feed \
+curl -XPUT localhost:9200/_ml/datafeeds/cpu-spike-feed \
-H 'Content-Type: application/json' -d '{
"job_id": "cpu-spike",
"frequency": "2s"
@@ -91,14 +91,14 @@ Response (the datafeed config, ES-shaped):
re-scores every `frequency`.
```bash
-curl -XPOST localhost:9486/_ml/datafeeds/cpu-spike-feed/_start
+curl -XPOST localhost:9200/_ml/datafeeds/cpu-spike-feed/_start
# -> {"started": true}
```
Read the results the first pass produced:
```bash
-curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records'
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records'
```
```json
@@ -107,6 +107,7 @@ curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records'
"records": [
{
"job_id": "cpu-spike",
+ "result_type": "record",
"timestamp": 1783296720000,
"timestamp_iso": "2026-07-06T00:12:00.000Z",
"actual": 96.0,
@@ -115,6 +116,7 @@ curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records'
"std_dev": 1.1636866703140785,
"z_score": 65.09484205018445,
"record_score": 100.0,
+ "anomaly_score": 100.0,
"bucket_span": "1m",
"is_anomaly": true
}
@@ -123,15 +125,17 @@ curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records'
```
Each record reuses the fields the `_score` endpoint emits per bucket, plus the
-ES `record_score` (the 0–100 severity) and `typical` (ES's name for the
-baseline `expected`).
+ES `record_score` (the 0–100 severity, mirrored as `anomaly_score`), the
+`result_type` tag, and `typical` (ES's name for the baseline `expected`). Those
+values are deterministic for this fixed series — this exact record is what the
+run below prints.
## 4. The continuous part
Now push a **new** spike into the live index — without touching the datafeed:
```bash
-curl -XPOST 'localhost:9486/_bulk?refresh=true' \
+curl -XPOST 'localhost:9200/_bulk?refresh=true' \
-H 'Content-Type: application/x-ndjson' --data-binary $'
{"index":{"_index":"cpu_datafeed"}}
{"@timestamp":"2026-07-06T00:20:00Z","cpu":88}
@@ -142,7 +146,7 @@ Within one `frequency` tick the background scorer re-buckets the series, sees th
new bucket, and appends it. Poll again a couple of seconds later:
```bash
-curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records'
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records'
# -> count: 2 (the 00:12 spike AND the new 00:20 spike)
```
@@ -164,56 +168,104 @@ pass appends only the **new** anomalies — the 00:12 record is never duplicated
```bash
# only high-severity records
-curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records?record_score=90'
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records?record_score=90'
# at most 5, most-recent-friendly (chronological)
-curl 'localhost:9486/_ml/anomaly_detectors/cpu-spike/results/records?size=5'
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records?size=5'
```
## 6. Stop and delete
```bash
-curl -XPOST localhost:9486/_ml/datafeeds/cpu-spike-feed/_stop
+curl -XPOST localhost:9200/_ml/datafeeds/cpu-spike-feed/_stop
# -> {"stopped": true} (aborts the background task)
-curl localhost:9486/_cat/ml/datafeeds
+curl localhost:9200/_cat/ml/datafeeds
# cpu-spike-feed stopped cpu-spike
-curl -XDELETE localhost:9486/_ml/datafeeds/cpu-spike-feed
+curl -XDELETE localhost:9200/_ml/datafeeds/cpu-spike-feed
# {"acknowledged": true}
```
A datafeed must be stopped before it can be deleted — deleting a `started`
datafeed returns `409`, exactly like Elasticsearch.
-## Run it
+## Reproduce it yourself
+
+Two shells, no external packages — the script is pure Python 3 standard library
+(no `pip install`, no third-party service, no API key).
```bash
-# XERJ listening on :9486 (adjust XERJ=... for another port)
+# 1. Start a throwaway XERJ (listens on :9200 by default)
+xerj --insecure
+
+# 2. In another shell, from the repo root, run the demo
python3 docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
+
+# Point it at a different host/port with XERJ_URL (XERJ still works as an alias):
+XERJ_URL=http://localhost:9200 python3 docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
```
The script maps the index, ingests the series with the first spike, creates the
-detector and datafeed, starts it, reads the first anomaly, injects the second
-spike into the live index, polls until the running datafeed picks it up on its
-own, then stops and **asserts** both spikes were detected — the second without a
-second `_start`. It exits non-zero if any of that regresses, so it doubles as a
-smoke test.
+detector and datafeed, starts it, dumps the first anomaly record in full, injects
+the second spike into the live index, polls until the running datafeed picks it
+up on its own, then filters/caps the results, stops, deletes, and **asserts**
+both spikes were detected — the second without a second `_start`. It exits
+non-zero if any of that regresses, so it doubles as a smoke test.
+
+The metric series is fixed, so the numbers are deterministic run to run: the
+00:12 bucket scores `actual 96.0` against `expected 20.25` (`std_dev
+1.1636866703140785`, `z_score 65.09`, `record_score 100.0`) and the
+continuously-detected 00:20 bucket scores `actual 88.0` against the same
+baseline. Only the wall time (~2s, one or two `2s` scorer ticks) varies.
Expected output:
```
datafeed cpu-spike-feed -> job cpu-spike (every 2s), state=stopped
+ raw datafeed config:
+ {
+ "datafeed_id": "cpu-spike-feed",
+ "frequency": "2s",
+ "indices": [
+ "cpu_datafeed"
+ ],
+ "job_id": "cpu-spike",
+ "query": {
+ "match_all": {}
+ },
+ "state": "stopped"
+ }
after _start — 1 anomaly record(s) from the first pass:
when actual expected record_score
2026-07-06 00:12 UTC 96.0 20.2 100.0
+ raw first record:
+ {
+ "actual": 96.0,
+ "anomaly_score": 100.0,
+ "bucket_span": "1m",
+ "expected": 20.25,
+ "is_anomaly": true,
+ "job_id": "cpu-spike",
+ "record_score": 100.0,
+ "result_type": "record",
+ "std_dev": 1.1636866703140785,
+ "timestamp": 1783296720000,
+ "timestamp_iso": "2026-07-06T00:12:00.000Z",
+ "typical": 20.25,
+ "z_score": 65.09484205018445
+ }
+
injecting a new spike at 00:20, waiting for the 2s scorer...
datafeed picked up 1 new anomaly record(s) on its own:
when actual expected record_score
2026-07-06 00:20 UTC 88.0 20.2 100.0
+filter record_score>=90 -> 2 record(s); size=1 cap -> 1 record(s)
_stop -> {'stopped': True} · datafeed state now: stopped
+_cat/ml/datafeeds -> 'cpu-spike-feed stopped cpu-spike'
+DELETE datafeed -> {'acknowledged': True}
OK: 2 anomalies detected continuously; datafeed stopped cleanly.
```
diff --git a/docs/recipes/hybrid-search.md b/docs/recipes/hybrid-search.md
index 785060375..030045d29 100644
--- a/docs/recipes/hybrid-search.md
+++ b/docs/recipes/hybrid-search.md
@@ -115,19 +115,18 @@ POST /helpdesk/_search
}
```
-Real response (trimmed to `title`):
+Real response (trimmed to `title`, printed verbatim by the script):
```json
{
"hits": {
- "total": { "value": 5, "relation": "eq" },
- "max_score": 0.03278,
+ "total": { "value": 4, "relation": "eq" },
+ "max_score": 0.03279,
"hits": [
- { "_id": "d1", "_score": 0.03278, "_source": { "title": "Reset your password" } },
- { "_id": "d5", "_score": 0.03200, "_source": { "title": "Change your account password" } },
- { "_id": "d3", "_score": 0.03150, "_source": { "title": "Password complexity and rotation policy" } },
- { "_id": "d2", "_score": 0.01613, "_source": { "title": "Regain entry to a locked-out account" } },
- { "_id": "d4", "_score": 0.01538, "_source": { "title": "How to bake sourdough bread" } }
+ { "_id": "d1", "_score": 0.03279, "_source": { "title": "Reset your password" } },
+ { "_id": "d5", "_score": 0.03175, "_source": { "title": "Change your account password" } },
+ { "_id": "d3", "_score": 0.01613, "_source": { "title": "Password complexity and rotation policy" } },
+ { "_id": "d2", "_score": 0.01613, "_source": { "title": "Regain entry to a locked-out account" } }
]
}
}
@@ -135,17 +134,32 @@ Real response (trimmed to `title`):
**d2** (only kNN found it) and **d3** (only BM25 found it) are now *both*
on the page, and **d1** — the doc that matched on *both* keyword and
-vector — is still ranked #1. That's the whole point: fusion rewards
-agreement between the two signals and still admits the strong
-single-signal hits that either method alone would have dropped.
+vector — is still ranked #1. Watch **d5**: neither BM25 nor kNN ranks it
+better than #3, yet because *both* signals agree on it, fusion promotes
+it to **#2** — ahead of d3 and d2, each of which is strong in only one
+modality. That's the whole point: fusion rewards agreement between the
+two signals while still admitting the strong single-signal hits that
+either method alone would have dropped.
+
+Only **four** docs come back, not five: d4 ("How to bake sourdough
+bread") is in *neither* sub-query's result set — it shares no keywords
+and its topic vector falls outside the kNN `k:3` cutoff — so RRF never
+sees it. Fusion ranks the *union* of the sub-query hits, nothing more.
## How the fusion works
`"fusion": "rrf"` uses Reciprocal Rank Fusion: each sub-query contributes
-`weight / (k + rank)` for a doc (default `k = 60`), summed across
-sub-queries. It ranks by *position*, not raw score, so BM25's `~0.5`
-scores and kNN's `~0.99` cosines never have to be normalized onto a
-common scale — a persistent headache when you fuse two systems yourself.
+`weight / (k + rank)` for a doc (default `k = 60`, `rank` is 1-based),
+summed across sub-queries. It ranks by *position*, not raw score, so
+BM25's `~0.5` scores and kNN's `~0.99` cosines never have to be
+normalized onto a common scale — a persistent headache when you fuse two
+systems yourself. The scores above fall straight out of this formula:
+
+- **d1** is rank 1 in *both* lists → `1/(60+1) + 1/(60+1) = 0.03279`.
+- **d5** is rank 3 in *both* lists → `1/63 + 1/63 = 0.03175`, still beating
+ either single-list hit because two contributions stack.
+- **d3** and **d2** each appear in *one* list at rank 2 → `1/(60+2) =
+ 0.01613` apiece — an exact tie.
Other `fusion` options:
@@ -156,19 +170,29 @@ Other `fusion` options:
Per-query `weight` lets you bias the blend, e.g. `1.5` on the `match`
sub-query to favor exact terms.
-## Run it
+## Reproduce it yourself
-No dependencies beyond Python 3 stdlib. Point it at a running XERJ:
+No dependencies beyond the Python 3 standard library — no pip install, no
+API keys, no external service. Point it at a running XERJ:
```bash
-# start XERJ (insecure, local data dir) on port 9485
-xerj --insecure --data-dir /tmp/xerj-hybrid --config <(printf '[server]\nes_compat_port = 9485\n')
+# 1. start a throwaway XERJ (insecure, local data dir) on the default port 9200
+xerj --insecure --data-dir /tmp/xerj-hybrid \
+ --config <(printf '[server]\nes_compat_port = 9200\n')
-# in another shell
+# 2. in another shell, run the example (defaults to http://localhost:9200)
python3 docs/examples/hybrid-search/hybrid_search.py
```
-Expected tail:
+The script reads its target from `XERJ_URL` (default
+`http://localhost:9200`); the legacy `BASE` alias still works. To hit a
+server on another port:
+
+```bash
+XERJ_URL=http://localhost:9485 python3 docs/examples/hybrid-search/hybrid_search.py
+```
+
+Expected tail (verified live):
```
--- assertions ---
@@ -179,11 +203,18 @@ PASS d1 (keyword + vector match) still ranks #1 under fusion
BM25 ids : ['d1', 'd3', 'd5']
kNN ids : ['d1', 'd2', 'd5']
-Hybrid ids: ['d1', 'd3', 'd5', 'd2', 'd4']
+Hybrid ids: ['d1', 'd5', 'd2', 'd3']
OK
```
+The four assertions and the scores are deterministic; the BM25 and kNN
+id lists are stable, and the hybrid list always starts `['d1', 'd5', …]`.
+The **only** run-to-run wobble is the last two ids — **d3 and d2 tie at
+exactly `0.01613`**, so they swap freely between positions #3 and #4
+(across a dozen runs we saw both `d2, d3` and `d3, d2`). The recipe's
+point — that d2 and d3 both appear and d1 stays #1 — holds every time.
+
## Notes & limits
- **`knn` in a query scores every doc that has the field**, ranked by
@@ -191,12 +222,14 @@ OK
plus `size:3` means "show the 3 nearest." For a hard candidate cap
independent of `size`, keep `k` small — it's carried on the sub-query.
- **Score scales differ by fusion.** RRF returns small fused scores
- (`~0.01–0.03` here) — compare docs *within* a response, not against
+ (`0.016–0.033` here) — compare docs *within* a response, not against
BM25/cosine absolutes.
-- **Tie ordering is not guaranteed** for docs with near-identical fused
- scores (d3 and d5 differ by `0.00005` here), so exact positions among
- ties can vary run to run. Set membership — the point of this recipe —
- is stable.
+- **Tie ordering is not guaranteed** for docs with identical fused scores.
+ d3 and d2 both score exactly `0.01613` here (each is a single rank-2 hit
+ in one sub-query), and they genuinely swap between positions #3 and #4
+ from one run to the next — we observed both orders across a dozen runs.
+ Set membership — the point of this recipe — is stable; the order *among
+ exact ties* is not.
- **Vector quality is your embeddings' job.** This recipe supplies
vectors directly for a deterministic demo. For real semantic recall,
generate `dense_vector` values with a production embedding model, or
diff --git a/docs/recipes/log-analytics.md b/docs/recipes/log-analytics.md
index b1b989195..4c8ddd0d0 100644
--- a/docs/recipes/log-analytics.md
+++ b/docs/recipes/log-analytics.md
@@ -27,7 +27,7 @@ Give the log fields explicit types up front. `@timestamp` must be a `date` for
`keyword` so they bucket exactly instead of being analyzed.
```bash
-curl -XPUT localhost:9483/logs-app -H 'Content-Type: application/json' -d '{
+curl -XPUT localhost:9200/logs-app -H 'Content-Type: application/json' -d '{
"mappings": { "properties": {
"@timestamp": {"type": "date"},
"level": {"type": "keyword"},
@@ -176,20 +176,43 @@ payments 73 269 103 958
low-volume but has the worst worst-case (958 ms). That's the whole triage
picture from three `_search` calls.
-## Run it
+## Reproduce it yourself
+
+The tables above are the real, captured output of this exact script. The dataset
+is generated with a fixed seed (`random.seed(7)`), so the counts, error rates,
+percentiles, and per-service tables are **deterministic** — you will get the same
+numbers shown here. The only run-to-run variance is `took` (per-query latency),
+which stays in the single-digit milliseconds (this run: Q1 `took=4 ms`, Q2
+`took=5 ms`).
```bash
-# 1. Boot XERJ (insecure/local) on a port of your choice
-printf '[server]\nes_compat_port = 9483\n' > /tmp/xerj.toml
-./engine/target/release/xerj --insecure --data-dir /tmp/xerj-logs --config /tmp/xerj.toml &
+# 1. Start XERJ on its default port (9200), insecure/local — no config needed
+./engine/target/release/xerj --insecure --data-dir /tmp/xerj-logs &
-# 2. Run the recipe (stdlib only — no pip installs)
-python3 docs/examples/log-analytics/log_analytics.py http://localhost:9483
+# 2. Run the recipe (stdlib only — no pip installs, no third-party network calls)
+python3 docs/examples/log-analytics/log_analytics.py
```
-The script creates the mapping, bulk-ingests 600 events, runs all three
-queries, and prints the tables above. It asserts the ingest count and that
-`_bulk` reported no errors, so a green run means the aggregations are real.
+The client reads the server URL from `$XERJ_URL` (default
+`http://localhost:9200`). A positional argument still overrides it if you run
+XERJ on a different port, e.g.
+`python3 docs/examples/log-analytics/log_analytics.py http://localhost:9483`.
+
+The script creates the mapping, bulk-ingests 600 events, runs all three queries,
+and prints the tables above. It asserts the ingest count and that `_bulk`
+reported no errors, so a green run means the aggregations are real.
+
+A green run prints the three per-question tables shown above and ends with
+`All aggregations returned.` — the deterministic headline numbers it produces,
+summarized:
+
+```
+Ingested 600 log events into 'logs-app'
+
+Q1 hourly error rate: 08:00 6.9% · 09:00 3.0% · 10:00 4.7% · 11:00 2.2% · 12:00 2.2% · 13:00 4.7%
+Q2 fleet latency: p50=56 ms p95=321 ms p99=565 ms (per-service p95: catalog 51, search 79, checkout 447, payments 529)
+Q3 top services: catalog 190 · search 187 · checkout 150 · payments 73 (payments worst-case 958 ms)
+```
## Notes and honest limits
diff --git a/docs/recipes/migrate-from-elasticsearch.md b/docs/recipes/migrate-from-elasticsearch.md
index 1b14f0bbf..179a135ab 100644
--- a/docs/recipes/migrate-from-elasticsearch.md
+++ b/docs/recipes/migrate-from-elasticsearch.md
@@ -69,25 +69,25 @@ curl -s "$ES/products/_search" -H 'Content-Type: application/json' -d '{
}'
```
-Real result — BM25-ranked, standard `hits.total.value` / `_score` shape:
+Real result — BM25-ranked, standard `hits.total.value` / `_score` shape (exact captured values):
```
-total: 4
+total: 4 max_score: 0.5754
0.575 Aluminum water bottle
0.575 Insulated steel water bottle
- 0.288 Glass water carafe # matched "water"
- 0.288 Plastic sports bottle # matched "bottle"
+ 0.288 Glass water carafe
+ 0.288 Plastic sports bottle
```
-Note the classic OR semantics of `match`: "Glass water carafe" and "Plastic sports bottle" each match one term and rank below the docs matching both. The full hit shape is exactly ES's:
+Note the classic OR semantics of `match`: "Glass water carafe" matches only "water" and "Plastic sports bottle" matches only "bottle", so each scores `0.288` and ranks below the two docs that match both terms (`0.575`). The full hit shape is exactly ES's:
```json
{
"hits": {
"total": { "value": 4, "relation": "eq" },
- "max_score": 1.4168,
+ "max_score": 0.5753642320632935,
"hits": [
- { "_index": "products", "_id": "1", "_score": 1.4168,
+ { "_index": "products", "_id": "1", "_score": 0.5753642320632935,
"_source": { "name": "Aluminum water bottle", "brand": "Klean", "price": 24.99 } }
]
}
@@ -153,28 +153,43 @@ Real result — the standard `buckets` shape with `doc_count_error_upper_bound`
### 6. Ops check — `GET /_cat/indices?v`
-The human-readable `_cat` table your dashboards and shell scripts parse:
+The human-readable `_cat` table your dashboards and shell scripts parse. The columns are ES's order — `health status index uuid pri rep docs.count docs.deleted store.size pri.store.size`:
```
-health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
-green open products f5c15d1... 1 0 6 0 10901b 10901b
+green open products 0ddfa388-df97-4b4b-9c9d-b9782b1b493a 1 0 6 0 10901b 10901b
```
-`_cat/indices` also lists XERJ's internal `.xerj_*` system indices (sessions, users, dashboards, etc.), analogous to Elasticsearch's own `.security`/`.kibana` dot-indices. Filter them the same way you would in ES: `GET /_cat/indices/products?v` or a `products*` pattern.
+Two honest deltas from Elasticsearch here:
-## Run it
+- **`?v` does not emit a column-header row.** XERJ returns the data rows only, even with `?v`. The column *order* is ES's, so anything parsing by position keeps working; anything that keys off the header line does not.
+- **No per-index `_cat` path.** XERJ serves the whole-cluster `GET /_cat/indices` (which, like ES's own `.security`/`.kibana` dot-indices, also lists XERJ's internal `.xerj_*` system indices). The per-index form `GET /_cat/indices/products` returns **404** in this build, so filter client-side instead — e.g. `curl -s "$ES/_cat/indices?v" | grep ' products '`.
-The full script is [`docs/examples/migrate-from-elasticsearch/migrate_demo.sh`](../examples/migrate-from-elasticsearch/migrate_demo.sh). Boot XERJ and run every step above end-to-end:
+(The `uuid` column is a fresh per-response value in this build — treat it as illustrative, not stable.)
+
+## Reproduce it yourself
+
+The full script is [`docs/examples/migrate-from-elasticsearch/migrate_demo.sh`](../examples/migrate-from-elasticsearch/migrate_demo.sh) — stdlib-only (`curl` + `python3` as a JSON pretty-printer, no third-party packages, no external network calls). Boot XERJ and run every step above end-to-end:
```bash
-# 1. Boot XERJ (insecure = no TLS/auth, for local demo)
+# 1. Boot XERJ (insecure = no TLS/auth, for local demo). ES-wire on :9200 by default.
xerj --insecure --data-dir /tmp/xerj-demo &
-# 2. Run the standard-ES demo against it — the ONLY change is the URL
-ES=http://localhost:9200 ./migrate_demo.sh
+# 2. Run the standard-ES demo against it — the ONLY change is the URL.
+# ES is the documented knob; XERJ_URL is accepted as an alias.
+ES=http://localhost:9200 bash docs/examples/migrate-from-elasticsearch/migrate_demo.sh
```
-It prints each request's result and ends with `All standard Elasticsearch calls succeeded against XERJ`. To A/B against a real cluster, run the identical script with `ES=http://your-elasticsearch:9200` — same script, same output shape.
+It exits `0` and ends with `All standard Elasticsearch calls succeeded against XERJ`. The exact numbers this run produces (deterministic on this 6-doc corpus):
+
+| Step | What you see |
+|---|---|
+| 2. `_bulk` | `errors: false items: 6` |
+| 3. `match "water bottle"` | `total: 4 max_score: 0.5754` → `0.575` Aluminum, `0.575` Insulated, `0.288` Glass, `0.288` Plastic |
+| 4. `bool` (match + terms + range) | `total: 2` → Klean 24.99 Aluminum, Hydro 39.95 Insulated |
+| 5. `terms` agg by brand | `total docs: 6`; buckets Bodum 2, Hydro 2, Klean 2; `doc_count_error_upper_bound: 0`, `sum_other_doc_count: 0` |
+| 6. `_cat/indices` products row | `docs.count 6`, `docs.deleted 0`, `store.size 10901b` |
+
+The BM25 `_score` values and bucket counts are stable run-to-run; only the `_cat` `uuid` column changes (see step 6). To A/B against a real cluster, run the identical script with `ES=http://your-elasticsearch:9200` — same script, same output shape.
## What to change in your real app
diff --git a/docs/recipes/passage-retrieval.md b/docs/recipes/passage-retrieval.md
index 4b9de724b..99515c2a5 100644
--- a/docs/recipes/passage-retrieval.md
+++ b/docs/recipes/passage-retrieval.md
@@ -59,16 +59,15 @@ even if the rest of it is about something else entirely.
## Try it
-`docs/examples/passage-retrieval/passage_demo.py` (identical to
-`recipes/passage_search.py`) indexes the 40 real KB articles as short docs
-**plus** one long "compendium" that concatenates all 40, then runs each
-article's title as a query and measures how often the long compendium reaches
-the top 3. Both arms use XERJ's own embedder — the pooled baseline reads
-XERJ's whole-document `<field>_vector` back out of `_source` — so the only
-variable is pooled-vs-per-passage:
+`docs/examples/passage-retrieval/passage_demo.py` indexes the 40 real KB
+articles as short docs **plus** one long "compendium" that concatenates all
+40, then runs each article's title as a query and measures how often the long
+compendium reaches the top 3 under each scoring mode. Both arms use XERJ's own
+embedder — the pooled baseline reads XERJ's whole-document `<field>_vector`
+back out of `_source` — so the only variable is pooled-vs-per-passage:
```
-$ python3 recipes/passage_search.py
+$ python3 docs/examples/passage-retrieval/passage_demo.py
40 short article docs + 1 long compendium of all 40
compendium embedded into 21 passage vectors (pooled into 1 whole-doc vector of 384 dims)
@@ -85,6 +84,38 @@ The compendium contains every topic, so with per-passage scoring it competes
for almost every query. Averaged into a single vector, it is a mediocre blur
that loses to the undiluted short docs two times out of three.
+## Reproduce it yourself
+
+Start XERJ on its default port (`9200`) and run the example — no keys, no
+external services, stdlib Python only:
+
+```bash
+# 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
+python3 docs/examples/passage-retrieval/passage_demo.py
+```
+
+Point it at a non-default host/port with `XERJ_URL=http://host:port`. The run
+is fully deterministic (offline lexical embedder over a fixed 40-article
+corpus), so every run prints the same numbers:
+
+```
+40 short article docs + 1 long compendium of all 40
+
+compendium embedded into 21 passage vectors (pooled into 1 whole-doc vector of 384 dims)
+
+compendium reached the top-3:
+ per-passage : 39/40 (98%)
+ pooled : 13/40 (32%)
+```
+
+Both `39/40` and `13/40` are computed by the run itself over the 40 title
+queries — nothing is hardcoded. If either arm regresses (per-passage top-3
+rate < 75%, or per-passage failing to beat pooled) the script exits non-zero,
+so it doubles as a CI gate.
+
## How it works
- **Chunker.** The built-in overlapping chunker (512-char passages, 64-char
diff --git a/docs/recipes/semantic-search-rag.md b/docs/recipes/semantic-search-rag.md
index 7f70b34a3..65cad454c 100644
--- a/docs/recipes/semantic-search-rag.md
+++ b/docs/recipes/semantic-search-rag.md
@@ -22,7 +22,7 @@ endpoint takes over.
## 1. Map one field as `semantic_text`
```bash
-curl -X PUT localhost:9482/kb -H 'Content-Type: application/json' -d '{
+curl -X PUT localhost:9200/kb -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"title": { "type": "text" },
@@ -42,7 +42,7 @@ declaration, no dimension bookkeeping, no second datastore.
Nothing special — the embedding happens under the hood:
```bash
-curl -X POST localhost:9482/_bulk -H 'Content-Type: application/x-ndjson' --data-binary '
+curl -X POST localhost:9200/_bulk -H 'Content-Type: application/x-ndjson' --data-binary '
{"index":{"_index":"kb","_id":"kb-1"}}
{"title":"Rotating an API key","body":"To change your API credentials, open Settings, choose Security, and click Regenerate token. The old token stops working immediately."}
{"index":{"_index":"kb","_id":"kb-2"}}
@@ -58,7 +58,7 @@ in the "Refund policy" doc analyzed the same way. The `semantic` query retrieves
it anyway:
```bash
-curl localhost:9482/kb/_search -H 'Content-Type: application/json' -d '{
+curl localhost:9200/kb/_search -H 'Content-Type: application/json' -d '{
"size": 2,
"query": { "semantic": { "field": "body", "query": "how do I regenerate my API token", "k": 2 } }
}'
@@ -76,7 +76,7 @@ Real response (trimmed):
"_source": {
"title": "Rotating an API key",
"body": "To change your API credentials, open Settings, choose Security, and click Regenerate token. The old token stops working immediately.",
- "body_vector": [ 0.0, 0.0, -0.2164437, ... ]
+ "body_vector": [ 0.0, 0.0, 0.0, ... ]
}
}
]
@@ -173,19 +173,45 @@ was configured for this recipe.
---
-## Run it
+## Reproduce it yourself
-Boot XERJ (Elasticsearch-compatible port shown as 9482 here), then:
+Start XERJ on its default port (`9200`) and run the example — no keys, no
+external services, stdlib Python only:
```bash
-BASE=http://localhost:9482 python3 docs/examples/semantic-search-rag/rag_demo.py
+# 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
+python3 docs/examples/semantic-search-rag/rag_demo.py
```
-The script (stdlib only — `urllib` + `json`, no pip) creates the index, bulk-loads
-the KB, runs the five semantic retrievals with assertions, prints the RAG context
-bundle, shows the keyword-vs-semantic contrast, demonstrates the lexical-embedder
-miss, and exits non-zero if any of the five retrievals regress. Point `BASE` at any
-XERJ (or real Elasticsearch with a `semantic_text`/inference setup) to compare.
+Point it at a non-default host/port with `XERJ_URL=http://host:port` (the older
+`BASE` variable still works as an alias). The script (stdlib only — `urllib` +
+`json`, no pip) creates the index, bulk-loads the KB, runs the five semantic
+retrievals with assertions, prints the RAG context bundle, shows the
+keyword-vs-semantic contrast, demonstrates the lexical-embedder miss, scores the
+ranking with `_rank_eval`, and exits non-zero if any of the five retrievals
+regress — so it doubles as a CI gate.
+
+The built-in embedder is deterministic (offline lexical model), so every run
+prints the same numbers:
+
+```
+bulk -> errors=False items=5
+...
+Q: 'how do I regenerate my API token' top -> kb-1 'Rotating an API key' score=0.6626 OK
+Q: 'can I get my money back after buying' top -> kb-2 'Refund policy' score=0.5771 OK
+Q: "I forgot my login and can't sign in" top -> kb-3 'Resetting a forgotten password' score=0.6710 OK
+Q: 'which file formats are supported for uploads' top -> kb-4 'Supported file formats for upload' score=0.5926 OK
+Q: 'how many calls per minute am I allowed' top -> kb-5 'Rate limits' score=0.6171 OK
+
+RESULT: 5/5 semantic retrievals returned the right doc at rank 1
+```
+
+Every score above is emitted by this run (the top `kb-1` score is
+`0.6625697016716003`, shown to 4 dp); nothing is hardcoded. Point `XERJ_URL` at
+real Elasticsearch with a `semantic_text`/inference setup to compare.
---
@@ -199,26 +225,39 @@ real (they are **not** aliases for precision): `precision`, `recall`, `dcg`
`expected_reciprocal_rank`. An unknown metric name returns `400` rather than
a misleading number.
+Scoring the regenerate-token ranking against this KB — `kb-1` is the one
+relevant answer, so with it at rank 1 the ranking is perfect:
+
```bash
-curl -sX POST "$BASE/kb/_rank_eval" -H 'content-type: application/json' -d '{
- "metric": { "dcg": { "k": 10, "normalize": true } },
+curl -sX POST localhost:9200/kb/_rank_eval -H 'content-type: application/json' -d '{
+ "metric": { "dcg": { "k": 3, "normalize": true } },
"requests": [
{
- "id": "chunking_q",
- "request": { "query": { "semantic": { "field": "content",
- "query": "how do I split documents for RAG?", "k": 10 } } },
+ "id": "regen_token_q",
+ "request": { "query": { "semantic": { "field": "body",
+ "query": "how do I regenerate my API token", "k": 3 } } },
"ratings": [
- { "_id": "kb-7", "rating": 3 },
- { "_id": "kb-12", "rating": 1 },
- { "_id": "kb-30", "rating": 0 }
+ { "_id": "kb-1", "rating": 3 },
+ { "_id": "kb-5", "rating": 0 },
+ { "_id": "kb-2", "rating": 0 }
]
}
]
}'
-# → { "metric_score": 0.87, "details": { "chunking_q": { "metric_score": 0.87, ... } } }
+# → { "metric_score": 1.0, "details": { "regen_token_q": { "metric_score": 1.0, ... } } }
+```
+
+Swap `"dcg"` for `"precision"`, `"recall"`, or `"mean_reciprocal_rank"` to score
+the *same* ranking a different way — each returns its own value. These are the
+figures the demo actually measures against this KB:
+
+```
+dcg (nDCG@3) metric_score=1.0
+precision@3 metric_score=0.3333333333333333
+recall@3 metric_score=1.0
+mean_reciprocal_rank metric_score=1.0
+unknown-metric -> HTTP 400 (fail-loud, not a misleading number)
```
-Swap `"dcg"` for `"precision"`, `"recall"`, `"mean_reciprocal_rank"`, or
-`"expected_reciprocal_rank"` to score the same ranking a different way — each
-returns its own value, so you can track whichever metric your product cares
-about as you tune embeddings, `k`, and hybrid weights.
+Track whichever metric your product cares about as you tune embeddings, `k`, and
+hybrid weights.
diff --git a/docs/recipes/vector-quantization.md b/docs/recipes/vector-quantization.md
index 6687f6dee..02a8a61a9 100644
--- a/docs/recipes/vector-quantization.md
+++ b/docs/recipes/vector-quantization.md
@@ -21,9 +21,10 @@ working set — while `_source` still returns the **original** vectors for
retrieval. It's off by default (full float32), so you choose precision vs.
memory per field, exactly like Elasticsearch's `int8_hnsw`.
-On a real 128-dim corpus the recall cost is negligible: **recall@10 ≈ 0.99**
+On a real 128-dim corpus the recall cost is negligible: **recall@10 = 0.998**
against the exact float32 index, with the vector footprint cut from 512 to
-128 bytes per vector.
+128 bytes per vector — a **measured 4.00× reduction**. (Both numbers are
+computed by the run below, not stipulated.)
## The solution
@@ -60,27 +61,60 @@ scores ~0.99999 instead of 1.0), but the **ranking is the same**.
## Try it
-`docs/examples/vector-quantization/quant_demo.py` (and the identical
-`recipes/vector_quantization.py`) embeds the 40 real KB articles into
-128-dim vectors, indexes the same vectors into a float32 index and a
-scalar8 index, and prints the side-by-side top hits plus recall@10:
+`docs/examples/vector-quantization/quant_demo.py` (the mirrored
+`recipes/vector_quantization.py` runs the same demo) embeds the 40 real KB
+articles into 128-dim vectors, indexes the same vectors into a float32 index
+and a scalar8 index, and prints the side-by-side top hits, the measured
+recall@10, and the measured byte footprint of each encoding:
```
-$ python3 recipes/vector_quantization.py
+$ python3 docs/examples/vector-quantization/quant_demo.py
embedded 40 real KB articles into 128-dim vectors
+
indexed into `vq-none` (float32) and `vq-scalar8` (int8_hnsw / scalar8)
+query: 'how do I stop an agent's context window from overflowing?'
+
── float32 (exact)
- 0.67960 Long-context windows do not replace memory
+ 0.67958 Long-context windows do not replace memory
0.60029 p95 latency budgets for interactive RAG agents
+ 0.59712 SOC 2 controls that apply to vector workloads
+
── scalar8 (quantized)
0.67938 Long-context windows do not replace memory
0.60021 p95 latency budgets for interactive RAG agents
+ 0.59731 SOC 2 controls that apply to vector workloads
recall@10 (scalar8 vs float32 ground truth): 0.998
-vector footprint: float32 = 512 B/vec → scalar8 = 128 B/vec (4x smaller)
+vector footprint over 40 vecs: float32 = 20480 B (512 B/vec) → scalar8 = 5120 B (128 B/vec) (4.00x smaller)
+
+OK — 4x smaller vectors, recall preserved. `_source` still holds the originals.
```
+The footprint line is a real measurement: the run encodes every corpus
+vector as float32 bytes (`struct`) and as int8 codes and compares the actual
+byte totals — 20480 B vs 5120 B, exactly 4.00×.
+
+## Reproduce it yourself
+
+```bash
+# 1. Start XERJ (dev mode, default ES-compat port 9200)
+xerj --insecure --data-dir ./data &
+
+# 2. Run the demo (stdlib-only Python 3, no packages, no API keys)
+python3 docs/examples/vector-quantization/quant_demo.py
+```
+
+`XERJ_URL` overrides the server (default `http://localhost:9200`); `XERJ_KB`
+overrides the KB path (default: auto-discovered `demo/data/ai_kb.ndjson`).
+The embedder and corpus are deterministic, so a customer should see exactly:
+
+- `recall@10 (scalar8 vs float32 ground truth): 0.998`
+- `vector footprint over 40 vecs: float32 = 20480 B (512 B/vec) → scalar8 = 5120 B (128 B/vec) (4.00x smaller)`
+
+These numbers are stable run-to-run (verified across repeated runs — no
+variance); the printed kNN scores are likewise identical each run.
+
## Notes and limits
- **Opt-in per field.** Fields without `int8_hnsw` keep exact float32
diff --git a/docs/recipes/vector-search-knn.md b/docs/recipes/vector-search-knn.md
index bcb7c6523..0321995df 100644
--- a/docs/recipes/vector-search-knn.md
+++ b/docs/recipes/vector-search-knn.md
@@ -106,7 +106,7 @@ Query the *other* corner and the space cleanly separates:
curl -X POST http://localhost:9200/catalog/_search -H 'Content-Type: application/json' -d '{
"knn": { "field": "embedding", "query_vector": [0.0, 0.0, 0.9, 0.85], "k": 2, "num_candidates": 10 }
}'
-# → Pickup Truck (1.0), Sports Car (0.999) — only vehicles
+# → Pickup Truck (1.0), Sports Car (0.9992) — only vehicles
```
---
@@ -153,23 +153,36 @@ filter genuinely restricted the pool — it didn't just re-score.
---
-## Run it
+## Reproduce it yourself
-Boot XERJ (`target/release/xerj --insecure --data-dir ./data`, default
-port 9200) and run the self-checking script — stdlib only, no pip:
+Boot XERJ on its default port and run the self-checking script — stdlib
+only, no pip, no network calls:
```bash
+# 1. start a throwaway node (default ES-compat port 9200)
+./engine/target/release/xerj --insecure --data-dir ./data
+
+# 2. in another shell, from the repo root:
python3 docs/examples/vector-search-knn/knn_demo.py
```
-It creates the index, bulk-loads the catalog, runs all three searches,
-and asserts the recall and filter behavior. Expected tail:
+The script reads its server URL from `XERJ_URL` (default
+`http://localhost:9200`); the older `BASE` variable still works as an
+alias. Point it at any node with `XERJ_URL=http://host:port python3 …`.
+
+It creates the index, bulk-loads the 8-row catalog, runs all three
+searches, and — beyond the pass/fail assertions — computes **recall@k
+against a brute-force exact-cosine ground truth built in-process**, so
+the "the result is exact" claim below is measured, not asserted. Exact
+tail from a real run:
```
=== kNN k=3, query ~citrus ===
('1', 0.9999, 'Navel Orange', 'fruit', True)
('2', 0.9997, 'Meyer Lemon', 'fruit', True)
('3', 0.9948, 'Blood Orange', 'fruit', False)
+ exact top-3 (brute-force cosine): ['1', '2', '3']
+ recall@3 = 1.000 (3/3 of the true nearest returned)
OK: top-3 are exactly the citrus fruits, no vehicles leaked in
=== kNN + bool.filter in_stock:true ===
@@ -181,12 +194,18 @@ and asserts the recall and filter behavior. Expected tail:
=== kNN k=2, query ~vehicle ===
('6', 1.0, 'Pickup Truck', 'vehicle', True)
('7', 0.9992, 'Sports Car', 'vehicle', False)
+ exact top-2 (brute-force cosine): ['6', '7']
+ recall@2 = 1.000
OK: vehicle query returns only vehicles
+MEASURED recall vs brute-force exact across queries: 1.000 (exact)
ALL ASSERTIONS PASSED
```
-(The script targets port 9484; change `BASE` if you booted on 9200.)
+The scores and recall are **deterministic for this 8-row corpus** —
+every run prints the same numbers (`recall@3 = recall@2 = 1.000`). The
+cosine scores above are the ES-normalized values `(1 + cos)/2`; unrounded
+they are `0.99985695`, `0.99970835`, `0.99479961` for the citrus top-3.
---
@@ -203,8 +222,10 @@ controls the search-time breadth (the ANN analog of `ef_search`) — raise
it to trade latency for recall, lower it for speed.
Because it's *approximate*, ANN can in principle miss a true neighbor.
-For a corpus this small the result is exact; the knobs above only start
-to matter at scale.
+For a corpus this small the result is **exact** — the script above
+measures **recall@k = 1.000** against a brute-force cosine ground truth
+on every query, confirming HNSW returned the identical top-k. The knobs
+above only start to matter at scale.
---
diff --git a/landing/docs/aggregations.html b/landing/docs/aggregations.html
index 1f462ee84..af4207f07 100644
--- a/landing/docs/aggregations.html
+++ b/landing/docs/aggregations.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -166,7 +180,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/analyzers.html b/landing/docs/analyzers.html
index 2b8596636..bc164c2ef 100644
--- a/landing/docs/analyzers.html
+++ b/landing/docs/analyzers.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -148,7 +162,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/api-es-compat.html b/landing/docs/api-es-compat.html
index 7eee163a1..4ebef3f34 100644
--- a/landing/docs/api-es-compat.html
+++ b/landing/docs/api-es-compat.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -191,7 +205,7 @@ JSON</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/api-native.html b/landing/docs/api-native.html
index 14ec3c6ce..e48332162 100644
--- a/landing/docs/api-native.html
+++ b/landing/docs/api-native.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -203,7 +217,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/backup-restore.html b/landing/docs/backup-restore.html
index 978f38aa2..50b18201c 100644
--- a/landing/docs/backup-restore.html
+++ b/landing/docs/backup-restore.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -188,7 +202,7 @@ $ curl -sXPOST .../v1/cluster/nodes/b/activate</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/cli.html b/landing/docs/cli.html
index 389f18872..d87267ec9 100644
--- a/landing/docs/cli.html
+++ b/landing/docs/cli.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -153,7 +167,7 @@ OPTIONS:
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/clustering.html b/landing/docs/clustering.html
index a12ff4d99..0efb16e81 100644
--- a/landing/docs/clustering.html
+++ b/landing/docs/clustering.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -243,7 +257,7 @@ $ curl -sXPOST -H "Authorization: ApiKey $XERJ_API_KEY" \
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/compression.html b/landing/docs/compression.html
index a9dc7fdd4..8d4739a98 100644
--- a/landing/docs/compression.html
+++ b/landing/docs/compression.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -150,7 +164,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/config.html b/landing/docs/config.html
index 436fbcb2c..35c6373d9 100644
--- a/landing/docs/config.html
+++ b/landing/docs/config.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -245,7 +259,7 @@ tick_ms = 50</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/env.html b/landing/docs/env.html
index 3f5763e16..b0758c5a6 100644
--- a/landing/docs/env.html
+++ b/landing/docs/env.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -147,7 +161,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/index.html b/landing/docs/index.html
index dc803e011..cb265f67a 100644
--- a/landing/docs/index.html
+++ b/landing/docs/index.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -140,6 +154,72 @@
</a>
</div>
+ <h2>AI &amp; search recipes</h2>
+ <p>Task-oriented guides for building real things — every one verified end-to-end against a live XERJ, stdlib-only, reproducible. <a href="/docs/recipes/index.html">Browse all recipes →</a></p>
+
+ <div class="recipes">
+ <a class="recipe" href="/docs/recipes/semantic-search-rag.html">
+ <span class="num">01</span>
+ <span class="title">Semantic search &amp; RAG</span>
+ <p class="lead">Retrieval by meaning with <code class="inline">semantic_text</code> — auto-embed on ingest, no separate vector DB.</p>
+ <span class="meta">SEMANTIC_TEXT · <span class="accent">AUTO-EMBED</span> · RAG</span>
+ </a>
+ <a class="recipe" href="/docs/recipes/agentic-memory.html">
+ <span class="num">02</span>
+ <span class="title">Agent memory</span>
+ <p class="lead">Long-term memory for agents via the <code class="inline">/_memory</code> API — store, recall, forget, per-agent isolation.</p>
+ <span class="meta">/_MEMORY · <span class="accent">RECALL + FORGET</span> · PER-AGENT</span>
+ </a>
+ <a class="recipe" href="/docs/recipes/passage-retrieval.html">
+ <span class="num">03</span>
+ <span class="title">Passage retrieval</span>
+ <p class="lead">Auto-chunk long docs; a doc competes on its best passage via max-sim scoring.</p>
+ <span class="meta">CHUNKING · <span class="accent">MAX-SIM PASSAGES</span></span>
+ </a>
+ <a class="recipe" href="/docs/recipes/vector-search-knn.html">
+ <span class="num">04</span>
+ <span class="title">Vector search · kNN</span>
+ <p class="lead">Nearest-neighbor similarity over <code class="inline">dense_vector</code> (HNSW), with filters.</p>
+ <span class="meta">DENSE_VECTOR · HNSW · <span class="accent">FILTERED kNN</span></span>
+ </a>
+ <a class="recipe" href="/docs/recipes/vector-quantization.html">
+ <span class="num">05</span>
+ <span class="title">Vector quantization</span>
+ <p class="lead">Opt a <code class="inline">dense_vector</code> into <code class="inline">int8_hnsw</code> — smaller vectors, recall measured in the recipe.</p>
+ <span class="meta">INT8_HNSW · <span class="accent">SMALLER VECTORS</span> · MEASURED RECALL</span>
+ </a>
+ <a class="recipe" href="/docs/recipes/hybrid-search.html">
+ <span class="num">06</span>
+ <span class="title">Hybrid search</span>
+ <p class="lead">Keyword + vector in one query — results neither BM25 nor kNN ranks first alone.</p>
+ <span class="meta">BM25 + kNN · <span class="accent">RRF FUSION</span></span>
+ </a>
+ <a class="recipe" href="/docs/recipes/log-analytics.html">
+ <span class="num">07</span>
+ <span class="title">Log analytics</span>
+ <p class="lead">From raw logs to dashboards — error rates, p95 latency, top services via aggregations.</p>
+ <span class="meta">DATE_HISTOGRAM · P95 · <span class="accent">TOP SERVICES</span></span>
+ </a>
+ <a class="recipe" href="/docs/recipes/anomaly-detection.html">
+ <span class="num">08</span>
+ <span class="title">Anomaly detection</span>
+ <p class="lead">Statistical <code class="inline">_ml</code> detectors that flag spikes in metrics and logs.</p>
+ <span class="meta">_ML · <span class="accent">SPIKE DETECTION</span> · STATISTICAL</span>
+ </a>
+ <a class="recipe" href="/docs/recipes/continuous-anomaly-datafeeds.html">
+ <span class="num">09</span>
+ <span class="title">Anomaly datafeeds</span>
+ <p class="lead">A live <code class="inline">_ml</code> datafeed re-scores an index on a timer and stores anomaly records you poll.</p>
+ <span class="meta">_ML DATAFEED · <span class="accent">CONTINUOUS</span> · POLL</span>
+ </a>
+ <a class="recipe" href="/docs/recipes/migrate-from-elasticsearch.html">
+ <span class="num">10</span>
+ <span class="title">Migrate from Elasticsearch</span>
+ <p class="lead">Point your existing ES client at XERJ — same wire, change the URL.</p>
+ <span class="meta">SAME WIRE · <span class="accent">CHANGE THE URL</span></span>
+ </a>
+ </div>
+
<h2>Start here</h2>
<p>New to XERJ? Pick a path below. The quickstart is the fastest way to see something work; the install guide is for a real deployment.</p>
@@ -203,7 +283,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/ingest.html b/landing/docs/ingest.html
index f719c7792..740482162 100644
--- a/landing/docs/ingest.html
+++ b/landing/docs/ingest.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -154,7 +168,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/install.html b/landing/docs/install.html
index d2682f71b..5bd36843d 100644
--- a/landing/docs/install.html
+++ b/landing/docs/install.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -201,7 +215,7 @@ $ docker run -d --name xerj \
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/metrics.html b/landing/docs/metrics.html
index 1e36dab3b..90231b9eb 100644
--- a/landing/docs/metrics.html
+++ b/landing/docs/metrics.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -164,7 +178,7 @@ scrape_configs:
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/migration-from-es.html b/landing/docs/migration-from-es.html
index f87337cb5..5cac03330 100644
--- a/landing/docs/migration-from-es.html
+++ b/landing/docs/migration-from-es.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -171,7 +185,7 @@ $ diff &lt;(curl -s http://es:9200/logs-2026-04/_search -d @q.json) \
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/operations.html b/landing/docs/operations.html
index 4275481b2..b7126340a 100644
--- a/landing/docs/operations.html
+++ b/landing/docs/operations.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -228,7 +242,7 @@ scrape_configs:
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/playbooks/full-text.html b/landing/docs/playbooks/full-text.html
index e433abc40..88b2c0b0a 100644
--- a/landing/docs/playbooks/full-text.html
+++ b/landing/docs/playbooks/full-text.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class="active"><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -183,7 +197,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/playbooks/log-analytics.html b/landing/docs/playbooks/log-analytics.html
index ef9c619ec..00176bd24 100644
--- a/landing/docs/playbooks/log-analytics.html
+++ b/landing/docs/playbooks/log-analytics.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -191,7 +205,7 @@ time_partition = "1h"</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/playbooks/observability.html b/landing/docs/playbooks/observability.html
index 29db47356..30fb4dd09 100644
--- a/landing/docs/playbooks/observability.html
+++ b/landing/docs/playbooks/observability.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class="active"><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -189,7 +203,7 @@ $ OTEL_EXPORTER_OTLP_ENDPOINT=http://xerj:8080/v1/indices/traces/otlp \
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/playbooks/siem.html b/landing/docs/playbooks/siem.html
index 0cec6bfdc..3694a6031 100644
--- a/landing/docs/playbooks/siem.html
+++ b/landing/docs/playbooks/siem.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -241,7 +255,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/playbooks/vector-search.html b/landing/docs/playbooks/vector-search.html
index a4e66467b..5bf1335cc 100644
--- a/landing/docs/playbooks/vector-search.html
+++ b/landing/docs/playbooks/vector-search.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -191,7 +205,7 @@ timeout_ms = 5000</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/queries.html b/landing/docs/queries.html
index 8f80e73b0..d875a6a63 100644
--- a/landing/docs/queries.html
+++ b/landing/docs/queries.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -187,7 +201,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/quickstart.html b/landing/docs/quickstart.html
index 03e1a454d..600049d65 100644
--- a/landing/docs/quickstart.html
+++ b/landing/docs/quickstart.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -175,7 +189,7 @@ $ xerj --config xerj.toml --insecure --data-dir /tmp/xerj</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/recipes/agentic-memory.html b/landing/docs/recipes/agentic-memory.html
new file mode 100644
index 000000000..9c868a328
--- /dev/null
+++ b/landing/docs/recipes/agentic-memory.html
@@ -0,0 +1,353 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Agent memory</title>
+<meta name="description" content="Give an AI agent long-term memory with XERJ's namespaced, offline agent-memory API — store, recall by vector or text, filter by metadata, forget, and keep each agent's memories isolated.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class="active"><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>AGENT MEMORY
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 02</span></div>
+ <h1>Agent memory</h1>
+
+
+ <p><strong>Use case:</strong> your agent learns things during a session — user preferences, project facts, decisions — and needs to <em>remember</em> them on a later turn to answer well. The usual answer is to bolt a separate vector database next to your search stack. XERJ folds that job into the engine you already run: a namespaced, offline <strong>agent-memory API</strong> (<code class="inline">/_memory/{ns}</code>) that stores text + an embedding + metadata and recalls the most relevant memories by <strong>vector similarity</strong> or <strong>plain text</strong>, with metadata filtering, forgetting, and hard per-agent isolation.</p>
+
+ <p>This recipe builds a tiny simulated coding-assistant agent (no LLM required) that:</p>
+ <ol>
+ <li><strong>stores</strong> what it learns as memories (<code class="inline">POST /_memory/{ns}</code>),</li>
+ <li><strong>recalls</strong> the right memory to answer a new question — semantically (kNN) and lexically (BM25),</li>
+ <li>does a <strong>metadata-filtered</strong> recall ("only surface team <em>preferences</em>"),</li>
+ <li><strong>forgets</strong> a memory that is no longer true, and</li>
+ <li>proves <strong>multi-namespace isolation</strong>: a second agent can never see the first agent's memories.</li>
+ </ol>
+
+ <p>Everything below was run end-to-end against a live XERJ. No pip installs — the example is Python 3 stdlib only.</p>
+
+ <h2>Why this replaces a bolt-on vector DB</h2>
+ <p>A memory namespace is just a reserved XERJ index (<code class="inline">.xerj-memory-{ns}</code>) under the hood, so recall reuses the same <code class="inline">dense_vector</code>/HNSW kNN, BM25, and metadata-filter paths that serve the rest of the engine. That means:</p>
+ <ul>
+ <li><strong>One system to run and back up.</strong> No second datastore, no sync job keeping a vector index consistent with your source of truth.</li>
+ <li><strong>kNN <em>and</em> BM25 in the same store.</strong> Recall by embedding similarity, by keyword, or filter both by metadata — no glue code.</li>
+ <li><strong>Namespaces are physical isolation.</strong> Each agent (or tenant, or user) gets its own backing index; a recall in namespace <code class="inline">A</code> literally cannot read namespace <code class="inline">B</code>.</li>
+ <li><strong>Offline and zero-config.</strong> You supply the vectors (from your own model); XERJ never phones out to embed.</li>
+ </ul>
+
+ <h2>The memory API, in four calls</h2>
+ <table>
+ <thead>
+ <tr><th>Verb + path</th><th>What it does</th><th>Body / result</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code class="inline">POST /_memory/{ns}</code></td><td>store a memory</td><td><code class="inline">{text, vector?, metadata?, id?}</code> → <code class="inline">{id, namespace, created}</code></td></tr>
+ <tr><td><code class="inline">POST /_memory/{ns}/_recall</code></td><td>recall top-k</td><td><code class="inline">{vector? | query?, k?, filter?}</code> → <code class="inline">{hits:[{id,text,metadata,score}]}</code></td></tr>
+ <tr><td><code class="inline">GET /_memory/{ns}</code></td><td>list recent (bounded)</td><td>→ <code class="inline">{count, entries:[…]}</code></td></tr>
+ <tr><td><code class="inline">DELETE /_memory/{ns}/{id}</code></td><td>forget one</td><td>→ <code class="inline">{id, forgotten}</code></td></tr>
+ <tr><td><code class="inline">DELETE /_memory/{ns}</code></td><td>drop the namespace</td><td>→ <code class="inline">{namespace, dropped}</code></td></tr>
+ </tbody>
+ </table>
+ <p><code class="inline">_recall</code> picks the path from the body: a <code class="inline">vector</code> runs kNN; otherwise <code class="inline">query</code> runs BM25 over the text; an empty body returns recent memories (<code class="inline">match_all</code>). <code class="inline">filter</code> is a normal ES query clause applied as a <code class="inline">bool</code> filter, so it narrows without affecting the score. Recall of an unknown namespace returns <code class="inline">{"hits": []}</code> — that is how isolation stays clean.</p>
+
+ <h3>Storing a memory (raw wire)</h3>
+<pre class="code">curl -XPOST localhost:9200/_memory/agent-ada -H 'content-type: application/json' -d '{
+ "text": "The team prefers Rust over Go for new backend services.",
+ "vector": [0.12, 0.0, 0.34],
+ "metadata": {"kind": "preference", "topic": "language"},
+ "id": "demo-1"
+}'</pre>
+<pre class="code">{"created":true,"id":"demo-1","namespace":"agent-ada"}</pre>
+
+ <h3>Recalling by vector, filtered to preferences (raw wire)</h3>
+<pre class="code">curl -XPOST localhost:9200/_memory/agent-ada/_recall -H 'content-type: application/json' -d '{
+ "vector": [0.12, 0.0, 0.34],
+ "k": 2,
+ "filter": {"term": {"metadata.kind": "preference"}}
+}'</pre>
+<pre class="code">{"hits":[{"id":"demo-1",
+ "metadata":{"kind":"preference","topic":"language"},
+ "score":1.0,
+ "text":"The team prefers Rust over Go for new backend services."}],
+ "namespace":"agent-ada"}</pre>
+
+ <p>Note <code class="inline">metadata.kind</code> filters straight out of the box — nested metadata subfields are queryable with a normal <code class="inline">term</code> clause, no explicit mapping needed.</p>
+
+ <h2>The full agent</h2>
+ <p>The script below is the whole example. The one thing to understand about it: it carries a <strong>tiny self-contained "embedder"</strong> (deterministic hashed character trigrams) so the demo needs no model download and cosine similarity is meaningful.</p>
+ <p><strong>Honesty check.</strong> That toy embedder is <em>lexical</em>, not neural: it rewards shared character n-grams (so <code class="inline">service</code>/<code class="inline">services</code>, <code class="inline">prefer</code>/<code class="inline">prefers</code> land near each other), but it does not know that "car" ≈ "automobile". For real semantic recall you pass vectors from your own model (OpenAI/Cohere/a local model) — the store and recall calls are byte-for-byte the same. XERJ's own built-in <code class="inline">semantic_text</code> embedder is likewise lexical unless you configure an external <code class="inline">/v1/embeddings</code> endpoint; the memory API deliberately takes <em>your</em> vectors so quality is your choice.</p>
+ <p>The full example script is on GitHub — <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/agentic-memory/agent_memory.py">docs/examples/agentic-memory/agent_memory.py</a> (Python 3 stdlib only, no dependencies).</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Start XERJ (single node, no TLS/auth) on its default port and run the script. Nothing to install — the client is Python 3 <strong>stdlib only</strong>.</p>
+<pre class="code"># 1. boot XERJ on the default port 9200
+./engine/target/release/xerj --insecure --data-dir /tmp/xerj-mem &amp;
+
+# 2. run the agent (defaults to http://localhost:9200)
+python3 docs/examples/agentic-memory/agent_memory.py
+
+# Point it at a different node/port with XERJ_URL if you like:
+# XERJ_URL=http://localhost:9481 python3 docs/examples/agentic-memory/agent_memory.py</pre>
+
+ <p><strong>What a customer should see.</strong> The client exits <code class="inline">0</code> and prints <code class="inline">All assertions passed.</code>. The recall-quality line is the headline number, and it is <strong>deterministic</strong> — the toy embedder and BM25 are fixed functions of this corpus, so the values below reproduce exactly, run to run:</p>
+ <ul>
+ <li><strong>Semantic (kNN):</strong> recall@1 = <strong>83.3% (5/6)</strong>, recall@3 = <strong>100% (6/6)</strong></li>
+ <li><strong>Lexical (BM25):</strong> recall@1 = <strong>100% (6/6)</strong>, recall@3 = <strong>100% (6/6)</strong></li>
+ </ul>
+ <p>The single semantic recall@1 miss is honest and instructive: on <em>"Which region is production deployed in?"</em> the toy trigram embedder scores <em>"<strong>Deploys</strong> are gated on CI…"</em> (0.790) a hair above the correct <em>"<strong>Production</strong> runs on AWS…"</em> (0.780) — shared <code class="inline">deploy</code>/<code class="inline">Deploys</code> character trigrams. The right memory is still in the top 3, and <strong>BM25 recalls it first (6/6)</strong>, which is exactly why the recipe offers both recall paths.</p>
+
+ <h3>Real output</h3>
+<pre class="code">== Storing what the agent learned this session ==
+ stored ada-1 created=True
+ stored ada-2 created=True
+ stored ada-3 created=True
+ stored ada-4 created=True
+ stored ada-5 created=True
+ stored ada-6 created=True
+
+== Semantic recall for: "What programming language should I use for a new backend service?"
+ [0.779] (preference) The team prefers Rust over Go for new backend services.
+ [0.741] (fact ) The payments service owns the Postgres 'ledger' database.
+ [0.731] (preference) The team prefers tabs over spaces and a 100-column line limit.
+
+== Lexical (BM25) recall for: "Which region is production deployed in?"
+ [3.746] (fact ) Production runs on AWS in us-east-1; staging is us-west-2.
+ [1.010] (fact ) Deploys are gated on the full integration suite passing in CI.
+
+== Preference-only recall for: "How should I set up the new service?"
+ [0.765] (preference) The team prefers Rust over Go for new backend services.
+ [0.692] (preference) The team prefers tabs over spaces and a 100-column line limit.
+ [0.666] (preference) The team prefers OpenTelemetry for tracing, not vendor SDKs.
+
+== Recall quality over 6 labeled probe questions ==
+ semantic (kNN): recall@1 = 83.3% (5/6) recall@3 = 100.0% (6/6)
+ lexical (BM25): recall@1 = 100.0% (6/6) recall@3 = 100.0% (6/6)
+
+== Namespace isolation ==
+ agent-billing recall for a coding question -&gt; ['Invoices over $10k require CFO approval.']
+ OK: agent-billing only ever sees its own namespace.
+
+== Forgetting a memory that is no longer true ==
+
+ before forget:
+ [0.755] (preference) The team prefers OpenTelemetry for tracing, not vendor SDKs.
+ [0.692] (fact ) Production runs on AWS in us-east-1; staging is us-west-2.
+ [0.683] (preference) The team prefers Rust over Go for new backend services.
+ forget -&gt; {'forgotten': True, 'id': 'ada-6', 'namespace': 'agent-ada'}
+
+ after forget:
+ [0.692] (fact ) Production runs on AWS in us-east-1; staging is us-west-2.
+ [0.683] (preference) The team prefers Rust over Go for new backend services.
+ [0.661] (preference) The team prefers tabs over spaces and a 100-column line limit.
+ OK: the retracted memory is gone.
+
+All assertions passed.</pre>
+
+ <p>Read the run top to bottom:</p>
+ <ul>
+ <li><strong>Semantic recall</strong> put the Rust preference on top for a question that never says "Rust" or "prefer" — trigram overlap on <em>backend / service / new</em> pulled it up over unrelated facts.</li>
+ <li><strong>BM25 recall</strong> answered the region question exactly, no vectors involved.</li>
+ <li><strong>Preference-only recall</strong> returned three memories, <em>all</em> <code class="inline">kind:"preference"</code> — the <code class="inline">metadata.kind</code> filter did its job.</li>
+ <li><strong>Recall quality</strong> over the 6 labeled probes is measured, not asserted by hand: BM25 recall@1 = 6/6, semantic recall@1 = 5/6, both recall@3 = 6/6 — a real number this run computed and printed.</li>
+ <li><strong>Isolation</strong> held: <code class="inline">agent-billing</code>, asked a coding question, only saw its own single finance memory.</li>
+ <li><strong>Forgetting</strong> removed <code class="inline">ada-6</code> (the tracing preference); the follow-up recall no longer surfaces it.</li>
+ </ul>
+
+ <h2>Notes, limits, and going to production</h2>
+ <ul>
+ <li><strong>Bring your own embeddings.</strong> The memory API stores whatever vector you pass and kNN-searches it with cosine similarity. Swap the toy <code class="inline">embed()</code> for a call to your model's embeddings endpoint and everything else is unchanged. Keep the vector dimension consistent within a namespace — the backing index's <code class="inline">dense_vector</code> field is sized from the first stored vector.</li>
+ <li><strong>Vector <em>or</em> text.</strong> A memory needs at least <code class="inline">text</code> or a <code class="inline">vector</code>. Text is always BM25-indexed; a vector additionally enables kNN recall. Recall with <code class="inline">vector</code> uses kNN; without it, <code class="inline">query</code> uses BM25.</li>
+ <li><strong>Recency (opt-in).</strong> Recall is pure relevance by default. Pass <code class="inline">recency_weight</code> in <code class="inline">[0, 1]</code> on <code class="inline">_recall</code> to blend recency: the engine over-fetches candidates and re-ranks by <code class="inline">(1 - w) * norm_relevance + w * norm_recency</code> (both min-max normalized across the candidate set), so <code class="inline">w = 1</code> surfaces the newest memory and <code class="inline">w = 0</code> is exactly the default relevance order. Verified: two same-vector memories tie on relevance; with <code class="inline">recency_weight: 1.0</code> the newer one is returned first. Useful when an agent's latest observation should win ties.</li>
+ <li><strong>Isolation is structural, not a filter.</strong> Namespaces are separate physical indices, so there is no query you can write in one namespace that reads another. Use one namespace per agent/tenant/user.</li>
+ <li><strong><code class="inline">GET /_memory/{ns}</code></strong> lists up to 100 most-recent entries for debugging/audit; it is bounded and recent-first, not a full export.</li>
+ <li><strong>Wire-compatible.</strong> Because a namespace is a real index, you can inspect or operate on it with the standard ES-compatible surface if you ever need to — the memory API is a thin, honest adapter over the same machinery.</li>
+ </ul>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/anomaly-detection.html b/landing/docs/recipes/anomaly-detection.html
new file mode 100644
index 000000000..9a9b8d446
--- /dev/null
+++ b/landing/docs/recipes/anomaly-detection.html
@@ -0,0 +1,372 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Anomaly detection</title>
+<meta name="description" content="Detect metric spikes on demand with XERJ's Elasticsearch-shaped anomaly detector — a moving-window z-score that flags the bucket where a metric broke out of its normal band.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class="active"><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>ANOMALY DETECTION
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 08</span></div>
+ <h1>Anomaly detection</h1>
+
+
+ <p><strong>Goal:</strong> you have a timestamped metric — CPU, latency, request rate, error count — and you want to know <em>when it went wrong</em> without hand-tuning a fixed red-line. A CPU box that idles at 20% is fine at 20% and alarming at 96%, but the "alarming" number depends on the box. You want the engine to learn the normal band and flag the minute it broke out.</p>
+
+ <p>XERJ ships an on-demand anomaly detector (<code class="inline">_ml/anomaly_detectors</code>, Elasticsearch wire-shape). You point it at an index, tell it the time field, the metric (<code class="inline">mean(cpu)</code>), and a bucket span. When you score it, XERJ buckets the data by time, computes the metric per bucket, builds a <strong>moving baseline from prior normal buckets</strong>, and scores each bucket by how many standard deviations it sits from that baseline. A spike lands many sigmas out and gets flagged; ordinary jitter does not.</p>
+
+ <p><strong>Honest scope.</strong> This is <strong>on-demand batch scoring</strong>: you POST <code class="inline">_score</code> and get the full timeline back in one response. There is <strong>no continuous datafeed or background job</strong> yet — nothing runs on a timer, and there is no alerting. To monitor live, call <code class="inline">_score</code> on a schedule (cron, your alertmanager, a <code class="inline">/loop</code>) over a recent time window and act on <code class="inline">anomaly_count</code>. The model is a transparent moving-window z-score, not a seasonal/multivariate ML model — it's excellent for "this metric jumped relative to its recent self," which covers the large majority of ops spikes.</p>
+
+ <h2>The scenario</h2>
+ <p><code class="inline">cpu_metrics</code> collects four host readings per minute. For fifteen minutes CPU sits around 20%. At <strong>minute 12</strong> a runaway process pins a box and the per-minute mean jumps to <strong>96%</strong>, then recovers. We want XERJ to flag exactly that minute.</p>
+
+ <h2>1. Map the index</h2>
+ <p>The time field must be a <code class="inline">date</code>; the metric must be numeric so the detector can average it.</p>
+<pre class="code">curl -XPUT localhost:9200/cpu_metrics -H 'Content-Type: application/json' -d '{
+ "mappings": { "properties": {
+ "@timestamp": { "type": "date" },
+ "host": { "type": "keyword" },
+ "cpu": { "type": "double" }
+ }}
+}'</pre>
+
+ <h2>2. Bulk-ingest the series (spike injected at minute 12)</h2>
+ <p>Standard <code class="inline">_bulk</code> NDJSON — 16 minutes × 4 hosts. Normal minutes read ~20%; minute 12 reads ~96%. (Full generator in the script below.)</p>
+<pre class="code">{"index":{"_index":"cpu_metrics"}}
+{"@timestamp":"2026-07-06T00:00:00Z","host":"web-0","cpu":19}
+...
+{"index":{"_index":"cpu_metrics"}}
+{"@timestamp":"2026-07-06T00:12:00Z","host":"web-1","cpu":96} &lt;- the spike
+...</pre>
+
+ <h2>3. Create the detector</h2>
+ <p><code class="inline">function: mean</code> over the <code class="inline">cpu</code> field, one-minute buckets. <code class="inline">anomaly_threshold</code> is the z-score gate (defaults to <code class="inline">3.0</code> — a bucket is flagged when it sits more than 3σ from the baseline).</p>
+<pre class="code">curl -XPUT localhost:9200/_ml/anomaly_detectors/cpu-spike \
+ -H 'Content-Type: application/json' -d '{
+ "source_index": "cpu_metrics",
+ "time_field": "@timestamp",
+ "function": "mean",
+ "field": "cpu",
+ "bucket_span": "1m",
+ "description": "CPU mean per minute"
+ }'</pre>
+
+ <p>Response (the config, ES-shaped):</p>
+<pre class="code">{
+ "job_id": "cpu-spike",
+ "job_type": "anomaly_detector",
+ "analysis_config": {
+ "bucket_span": "1m",
+ "detectors": [{ "function": "mean", "field_name": "cpu" }]
+ },
+ "data_description": { "time_field": "@timestamp" },
+ "source_index": ["cpu_metrics"],
+ "anomaly_threshold": 3.0
+}</pre>
+
+ <p>Supported <code class="inline">function</code> values: <code class="inline">count</code> (no field needed — buckets by doc count, great for request/error rate), <code class="inline">mean</code>/<code class="inline">avg</code>, <code class="inline">min</code>, <code class="inline">max</code>, <code class="inline">sum</code>.</p>
+
+ <h2>4. Score it</h2>
+<pre class="code">curl -XPOST localhost:9200/_ml/anomaly_detectors/cpu-spike/_score</pre>
+
+ <p>XERJ returns the whole timeline plus a ranked <code class="inline">anomalies</code> list. Rendered per bucket:</p>
+<pre class="code">minute (UTC) actual expected z_score score flag
+00:00:00 20.0 - - 0.0 &lt;- warm-up
+00:01:00 21.0 - - 0.0 &lt;- warm-up
+00:02:00 19.0 - - 0.0 &lt;- warm-up
+00:03:00 20.0 - - 0.0 &lt;- warm-up
+00:04:00 22.0 20.0 2.8 48.0
+00:05:00 18.0 20.4 -2.4 41.9
+00:06:00 21.0 20.0 0.8 16.4
+00:07:00 20.0 20.1 -0.1 2.6
+00:08:00 19.0 20.1 -1.0 20.0
+00:09:00 21.0 20.0 0.9 18.1
+00:10:00 20.0 20.1 -0.1 2.0
+00:11:00 22.0 20.1 1.8 33.5
+00:12:00 96.0 20.2 65.1 100.0 *** &lt;- SPIKE
+00:13:00 20.0 20.2 -0.2 4.8
+00:14:00 21.0 20.2 0.7 14.7
+00:15:00 19.0 20.3 -1.2 23.7
+
+== anomalies (1 of 16 buckets) ==
+ 2026-07-06T00:12:00.000Z actual=96.0 expected=20.2 z=65.1 score=100.0</pre>
+
+ <p>The spike record in full:</p>
+<pre class="code">{
+ "actual": 96.0,
+ "expected": 20.25,
+ "std_dev": 1.1636866703140785,
+ "z_score": 65.09484205018445,
+ "anomaly_score": 100.0,
+ "is_anomaly": true,
+ "timestamp_iso": "2026-07-06T00:12:00.000Z"
+}</pre>
+
+ <h2>How the scoring works (and how to read the numbers)</h2>
+ <ul>
+ <li><strong>Warm-up.</strong> The first 4 buckets seed the baseline and are not scored (<code class="inline">"expected": null</code>, <code class="inline">"note": "insufficient_baseline"</code>). Give the detector a span of history before the interesting part.</li>
+ <li><strong><code class="inline">expected</code> / <code class="inline">std_dev</code>.</strong> The mean and standard deviation of prior <strong>normal</strong> buckets. Crucially, a flagged bucket is <strong>not folded back into the baseline</strong> — one spike can't poison the expectation for the minutes after it. Notice <code class="inline">expected</code> stays ~20 straight through the spike.</li>
+ <li><strong><code class="inline">z_score</code>.</strong> <code class="inline">(actual − expected) / std_dev</code>. The spike is 65σ out; normal jitter stays within a couple of sigma.</li>
+ <li><strong><code class="inline">is_anomaly</code></strong> is the decision, gated purely on <code class="inline">|z| &gt; anomaly_threshold</code>. Only the spike crosses it here.</li>
+ <li><strong><code class="inline">anomaly_score</code> (0–100)</strong> is a normalized, human-friendly severity: it maps |z| = threshold to ~50 and saturates toward 100 for large deviations. It is <strong>not</strong> the flag. That's why the <code class="inline">00:04</code> jitter bucket shows a mid score of 48 (its z of 2.8 is close to the threshold of 3) yet is correctly <em>not</em> flagged. <strong>Alert on <code class="inline">is_anomaly</code> / <code class="inline">anomaly_count</code>; use <code class="inline">anomaly_score</code> for ranking and dashboards.</strong> In this run the spike (100.0) is more than 2× the top normal bucket (48.0) — clean separation.</li>
+ </ul>
+
+ <h2>Narrow or re-tune a run without recreating the job</h2>
+ <p><code class="inline">_score</code> accepts two per-run overrides in the POST body:</p>
+ <ul>
+ <li><strong><code class="inline">query</code></strong> — restrict which docs feed the buckets (e.g. one <code class="inline">host</code>, one service). Any XERJ query works: <code class="inline">{"query": {"term": {"host": "web-1"}}}</code>.</li>
+ <li><strong><code class="inline">anomaly_threshold</code></strong> — override the flag sensitivity for this run only.</li>
+ </ul>
+<pre class="code"># Same data, stricter gate (10σ) — the 65σ spike still stands alone.
+curl -XPOST localhost:9200/_ml/anomaly_detectors/cpu-spike/_score \
+ -H 'Content-Type: application/json' -d '{"anomaly_threshold": 10}'
+# -&gt; "anomaly_threshold": 10.0, "anomaly_count": 1</pre>
+
+ <h2>Count instead of mean (rate spikes)</h2>
+ <p>For "too many errors this minute" you don't need a metric field — use <code class="inline">function: count</code>, drop <code class="inline">field</code>, and point the detector at your log index. Each bucket's <code class="inline">actual</code> becomes the doc count, scored the same way. Same recipe, same response shape.</p>
+
+ <h2>List detectors</h2>
+<pre class="code">curl localhost:9200/_cat/ml/anomaly_detectors
+# cpu-spike opened cpu_metrics mean 1m</pre>
+
+ <p><code class="inline">GET /_ml/anomaly_detectors/{id}</code> and <code class="inline">DELETE /_ml/anomaly_detectors/{id}</code> round out lifecycle management.</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Start XERJ on its default port (<code class="inline">9200</code>) and run the example — no keys, no external services, stdlib Python only:</p>
+<pre class="code"># 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
+python3 docs/examples/anomaly-detection/anomaly_detection.py</pre>
+ <p>Point it at a non-default host/port with <code class="inline">XERJ_URL=http://host:port</code> (the legacy <code class="inline">XERJ=...</code> variable still works as an alias). The data is generated in-script with a fixed spike, so every run prints the same numbers:</p>
+<pre class="code">== detector created ==
+{ "job_id": "cpu-spike", "function": "mean", "bucket_span": "1m", "anomaly_threshold": 3.0 }
+
+00:12:00 96.0 20.2 65.1 100.0 *** &lt;- the spike
+
+== anomalies (1 of 16 buckets) ==
+ 2026-07-06T00:12:00.000Z actual=96.0 expected=20.2 z=65.1 score=100.0
+
+OK: spike at 00:12 flagged (score 100.0); 11 normal buckets, none flagged (top normal score 48.0).
+
+== spike record (full precision) ==
+{ "actual": 96.0, "expected": 20.25, "std_dev": 1.1636866703140785,
+ "z_score": 65.09484205018445, "anomaly_score": 100.0, "is_anomaly": true }
+
+== stricter re-score (anomaly_threshold=10) ==
+ anomaly_threshold=10.0 anomaly_count=1
+
+== _cat/ml/anomaly_detectors ==
+ cpu-spike opened cpu_metrics mean 1m</pre>
+
+ <p>The script maps the index, ingests the series with the injected spike, creates the detector, scores it, prints the table above, and <strong>asserts</strong> the result: exactly one anomaly, at 00:12, score 100.0, mean 96.0, 65σ out — and no normal bucket flagged (the spike's score is 100.0 vs. a top normal of 48.0, clean separation). It exits non-zero if any of that regresses, so it doubles as a smoke test.</p>
+
+ <p>Full example script on GitHub: <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/anomaly-detection/anomaly_detection.py">docs/examples/anomaly-detection/anomaly_detection.py</a>.</p>
+
+ <h2>Endpoint cheat-sheet</h2>
+ <table>
+ <thead>
+ <tr><th>Method</th><th>Path</th><th>Purpose</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code class="inline">PUT</code></td><td><code class="inline">/_ml/anomaly_detectors/{id}</code></td><td>create/replace a detector</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_ml/anomaly_detectors/{id}</code></td><td>fetch one detector's config</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_ml/anomaly_detectors</code></td><td>list all detectors</td></tr>
+ <tr><td><code class="inline">DELETE</code></td><td><code class="inline">/_ml/anomaly_detectors/{id}</code></td><td>remove a detector</td></tr>
+ <tr><td><code class="inline">POST</code></td><td><code class="inline">/_ml/anomaly_detectors/{id}/_score</code></td><td>score now; body may set <code class="inline">query</code>, <code class="inline">anomaly_threshold</code></td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_cat/ml/anomaly_detectors</code></td><td>one line per detector</td></tr>
+ </tbody>
+ </table>
+
+ <p>Config fields: <code class="inline">source_index</code> (required), <code class="inline">time_field</code> (default <code class="inline">@timestamp</code>), <code class="inline">function</code> (<code class="inline">count</code>/<code class="inline">mean</code>/<code class="inline">min</code>/<code class="inline">max</code>/<code class="inline">sum</code>, default <code class="inline">count</code>), <code class="inline">field</code> (required for everything but <code class="inline">count</code>), <code class="inline">bucket_span</code> (default <code class="inline">1h</code>), <code class="inline">anomaly_threshold</code> (z-gate, default <code class="inline">3.0</code>), <code class="inline">description</code>. ES-style <code class="inline">analysis_config.detectors[]</code> and <code class="inline">data_description.time_field</code> are also accepted for drop-in configs.</p>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/continuous-anomaly-datafeeds.html b/landing/docs/recipes/continuous-anomaly-datafeeds.html
new file mode 100644
index 000000000..df3b28497
--- /dev/null
+++ b/landing/docs/recipes/continuous-anomaly-datafeeds.html
@@ -0,0 +1,386 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Continuous anomaly datafeeds</title>
+<meta name="description" content="Run an Elasticsearch _ml datafeed on XERJ to score a live metric index for anomalies continuously — one pass now, then a background timer that appends only newly flagged buckets.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class="active"><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>CONTINUOUS ANOMALY DATAFEEDS
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 09</span></div>
+ <h1>Continuous anomaly datafeeds</h1>
+
+
+ <p><strong>Goal:</strong> you already know how to score a metric series for anomalies on demand (see <a href="/docs/recipes/anomaly-detection.html">Detect a spike in a metric series</a> — you POST <code class="inline">_score</code> and get the whole timeline back). But a dashboard or an alerting loop doesn't want to <em>ask</em> every time; it wants the engine to keep watching a live index and hand you new anomalies as they appear. That's a <strong>datafeed</strong>.</p>
+
+ <p>XERJ ships the Elasticsearch <code class="inline">_ml/datafeeds</code> surface. A datafeed references an existing anomaly-detection job (a detector), reads from one or more <code class="inline">indices</code> through an optional <code class="inline">query</code>, and runs on a fixed <code class="inline">frequency</code>. When you <code class="inline">_start</code> it, XERJ scores the series once immediately and then keeps re-scoring on a timer, appending only the <strong>newly</strong> flagged buckets to the job's results — which you read back with <code class="inline">GET /_ml/anomaly_detectors/{job}/results/records</code>. Same transparent moving mean/stddev z-score as the on-demand path; now it runs itself.</p>
+
+ <p><strong>Honest scope.</strong> The scoring is the same deterministic moving-window z-score as <code class="inline">_score</code> — a great fit for "this metric jumped relative to its recent self," not a seasonal/multivariate model. Results are held <strong>in memory</strong> (bounded to the last ~10k records per job) and the background scorer is a per-node <strong>tokio task</strong>: results and running datafeeds do <strong>not</strong> survive a restart (a reloaded datafeed comes back <code class="inline">stopped</code>, and <code class="inline">_start</code> begins a fresh run). This is single-node — there is no cross-node datafeed scheduler. It is exactly what you want for a live dashboard or a self-contained alert loop on one node; it is not a replacement for a clustered, durable ML pipeline.</p>
+
+ <h2>The scenario</h2>
+ <p><code class="inline">cpu_datafeed</code> collects one CPU reading per minute. For sixteen minutes it sits around 20%, with a runaway spike to <strong>96%</strong> at minute 12. We create a detector, attach a datafeed, and start it. Then — while the datafeed is running — a <strong>second</strong> spike (88%) lands at minute 20, and we watch the datafeed find it on its own.</p>
+
+ <h2>1. Map the index and create the detector</h2>
+ <p>The time field must be a <code class="inline">date</code>; the metric must be numeric. The detector is the same object as in the on-demand recipe: <code class="inline">mean(cpu)</code> over one-minute buckets.</p>
+<pre class="code">curl -XPUT localhost:9200/cpu_datafeed -H 'Content-Type: application/json' -d '{
+ "mappings": { "properties": {
+ "@timestamp": { "type": "date" },
+ "cpu": { "type": "double" }
+ }}
+}'
+
+curl -XPUT localhost:9200/_ml/anomaly_detectors/cpu-spike \
+ -H 'Content-Type: application/json' -d '{
+ "source_index": "cpu_datafeed",
+ "time_field": "@timestamp",
+ "function": "mean",
+ "field": "cpu",
+ "bucket_span": "1m"
+ }'</pre>
+
+ <h2>2. Create the datafeed</h2>
+ <p>A datafeed needs a <code class="inline">job_id</code> (which must reference an existing detector — else <code class="inline">404</code>). <code class="inline">indices</code> defaults to the detector's <code class="inline">source_index</code>, <code class="inline">query</code> to <code class="inline">match_all</code>, and <code class="inline">frequency</code> parses an ES time value (<code class="inline">"2s"</code>, <code class="inline">"5m"</code>, …; clamped to <code class="inline">&gt;= 1s</code>, default <code class="inline">60s</code>).</p>
+<pre class="code">curl -XPUT localhost:9200/_ml/datafeeds/cpu-spike-feed \
+ -H 'Content-Type: application/json' -d '{
+ "job_id": "cpu-spike",
+ "frequency": "2s"
+ }'</pre>
+ <p>Response (the datafeed config, ES-shaped):</p>
+<pre class="code">{
+ "datafeed_id": "cpu-spike-feed",
+ "job_id": "cpu-spike",
+ "state": "stopped",
+ "indices": ["cpu_datafeed"],
+ "query": { "match_all": {} },
+ "frequency": "2s"
+}</pre>
+
+ <h2>3. Start it — one pass now, then a timer</h2>
+ <p><code class="inline">_start</code> marks the datafeed <code class="inline">started</code>, runs <strong>one scoring pass synchronously</strong> (so results are immediately queryable), and spawns a background task that re-scores every <code class="inline">frequency</code>.</p>
+<pre class="code">curl -XPOST localhost:9200/_ml/datafeeds/cpu-spike-feed/_start
+# -&gt; {"started": true}</pre>
+ <p>Read the results the first pass produced:</p>
+<pre class="code">curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records'</pre>
+<pre class="code">{
+ "count": 1,
+ "records": [
+ {
+ "job_id": "cpu-spike",
+ "result_type": "record",
+ "timestamp": 1783296720000,
+ "timestamp_iso": "2026-07-06T00:12:00.000Z",
+ "actual": 96.0,
+ "typical": 20.25,
+ "expected": 20.25,
+ "std_dev": 1.1636866703140785,
+ "z_score": 65.09484205018445,
+ "record_score": 100.0,
+ "anomaly_score": 100.0,
+ "bucket_span": "1m",
+ "is_anomaly": true
+ }
+ ]
+}</pre>
+ <p>Each record reuses the fields the <code class="inline">_score</code> endpoint emits per bucket, plus the ES <code class="inline">record_score</code> (the 0–100 severity, mirrored as <code class="inline">anomaly_score</code>), the <code class="inline">result_type</code> tag, and <code class="inline">typical</code> (ES's name for the baseline <code class="inline">expected</code>). Those values are deterministic for this fixed series — this exact record is what the run below prints.</p>
+
+ <h2>4. The continuous part</h2>
+ <p>Now push a <strong>new</strong> spike into the live index — without touching the datafeed:</p>
+<pre class="code">curl -XPOST 'localhost:9200/_bulk?refresh=true' \
+ -H 'Content-Type: application/x-ndjson' --data-binary $'
+{"index":{"_index":"cpu_datafeed"}}
+{"@timestamp":"2026-07-06T00:20:00Z","cpu":88}
+'</pre>
+ <p>Within one <code class="inline">frequency</code> tick the background scorer re-buckets the series, sees the new bucket, and appends it. Poll again a couple of seconds later:</p>
+<pre class="code">curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records'
+# -&gt; count: 2 (the 00:12 spike AND the new 00:20 spike)</pre>
+ <p>The datafeed tracks the highest bucket timestamp it has already scored, so each pass appends only the <strong>new</strong> anomalies — the 00:12 record is never duplicated.</p>
+ <p><strong>A note on freshness.</strong> XERJ's read path caches aggregation results keyed by <code class="inline">(query, dataset_version)</code>, and version only bumps on a segment flush — so an <em>identical</em> query repeated against an index that has only taken unflushed (in-memory) writes can be served a cached result. Because a datafeed re-issues the same query every tick, its scorer deliberately requests an <strong>uncached</strong> read so it always sees the newest buckets. (The on-demand <code class="inline">_score</code> endpoint is unchanged and remains cache-eligible.)</p>
+
+ <h2>5. Filter and cap the results</h2>
+ <p><code class="inline">results/records</code> accepts a <code class="inline">record_score</code> floor (query param or JSON body) and a <code class="inline">size</code> cap:</p>
+<pre class="code"># only high-severity records
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records?record_score=90'
+# at most 5, most-recent-friendly (chronological)
+curl 'localhost:9200/_ml/anomaly_detectors/cpu-spike/results/records?size=5'</pre>
+
+ <h2>6. Stop and delete</h2>
+<pre class="code">curl -XPOST localhost:9200/_ml/datafeeds/cpu-spike-feed/_stop
+# -&gt; {"stopped": true} (aborts the background task)
+
+curl localhost:9200/_cat/ml/datafeeds
+# cpu-spike-feed stopped cpu-spike
+
+curl -XDELETE localhost:9200/_ml/datafeeds/cpu-spike-feed
+# {"acknowledged": true}</pre>
+ <p>A datafeed must be stopped before it can be deleted — deleting a <code class="inline">started</code> datafeed returns <code class="inline">409</code>, exactly like Elasticsearch.</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Two shells, no external packages — the <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py">example script</a> is pure Python 3 standard library (no <code class="inline">pip install</code>, no third-party service, no API key).</p>
+<pre class="code"># 1. Start a throwaway XERJ (listens on :9200 by default)
+xerj --insecure
+
+# 2. In another shell, from the repo root, run the demo
+python3 docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py
+
+# Point it at a different host/port with XERJ_URL (XERJ still works as an alias):
+XERJ_URL=http://localhost:9200 python3 docs/examples/continuous-anomaly-datafeeds/datafeed_demo.py</pre>
+ <p>The script maps the index, ingests the series with the first spike, creates the detector and datafeed, starts it, dumps the first anomaly record in full, injects the second spike into the live index, polls until the running datafeed picks it up on its own, then filters/caps the results, stops, deletes, and <strong>asserts</strong> both spikes were detected — the second without a second <code class="inline">_start</code>. It exits non-zero if any of that regresses, so it doubles as a smoke test.</p>
+ <p>The metric series is fixed, so the numbers are deterministic run to run: the 00:12 bucket scores <code class="inline">actual 96.0</code> against <code class="inline">expected 20.25</code> (<code class="inline">std_dev 1.1636866703140785</code>, <code class="inline">z_score 65.09</code>, <code class="inline">record_score 100.0</code>) and the continuously-detected 00:20 bucket scores <code class="inline">actual 88.0</code> against the same baseline. Only the wall time (~2s, one or two <code class="inline">2s</code> scorer ticks) varies.</p>
+ <p>Expected output:</p>
+<pre class="code">datafeed cpu-spike-feed -&gt; job cpu-spike (every 2s), state=stopped
+ raw datafeed config:
+ {
+ "datafeed_id": "cpu-spike-feed",
+ "frequency": "2s",
+ "indices": [
+ "cpu_datafeed"
+ ],
+ "job_id": "cpu-spike",
+ "query": {
+ "match_all": {}
+ },
+ "state": "stopped"
+ }
+
+after _start — 1 anomaly record(s) from the first pass:
+ when actual expected record_score
+ 2026-07-06 00:12 UTC 96.0 20.2 100.0
+
+ raw first record:
+ {
+ "actual": 96.0,
+ "anomaly_score": 100.0,
+ "bucket_span": "1m",
+ "expected": 20.25,
+ "is_anomaly": true,
+ "job_id": "cpu-spike",
+ "record_score": 100.0,
+ "result_type": "record",
+ "std_dev": 1.1636866703140785,
+ "timestamp": 1783296720000,
+ "timestamp_iso": "2026-07-06T00:12:00.000Z",
+ "typical": 20.25,
+ "z_score": 65.09484205018445
+ }
+
+injecting a new spike at 00:20, waiting for the 2s scorer...
+datafeed picked up 1 new anomaly record(s) on its own:
+ when actual expected record_score
+ 2026-07-06 00:20 UTC 88.0 20.2 100.0
+
+filter record_score&gt;=90 -&gt; 2 record(s); size=1 cap -&gt; 1 record(s)
+_stop -&gt; {'stopped': True} · datafeed state now: stopped
+_cat/ml/datafeeds -&gt; 'cpu-spike-feed stopped cpu-spike'
+DELETE datafeed -&gt; {'acknowledged': True}
+
+OK: 2 anomalies detected continuously; datafeed stopped cleanly.</pre>
+
+ <h2>Endpoint cheat-sheet</h2>
+ <table>
+ <thead>
+ <tr><th>Method</th><th>Path</th><th>Purpose</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code class="inline">PUT</code></td><td><code class="inline">/_ml/datafeeds/{id}</code></td><td>create/replace a datafeed (<code class="inline">job_id</code> required; <code class="inline">indices</code>, <code class="inline">query</code>, <code class="inline">frequency</code> optional)</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_ml/datafeeds/{id}</code></td><td>fetch one datafeed</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_ml/datafeeds</code></td><td>list all datafeeds (<code class="inline">{datafeeds, count}</code>)</td></tr>
+ <tr><td><code class="inline">DELETE</code></td><td><code class="inline">/_ml/datafeeds/{id}</code></td><td>remove a datafeed (must be stopped, else <code class="inline">409</code>)</td></tr>
+ <tr><td><code class="inline">POST</code></td><td><code class="inline">/_ml/datafeeds/{id}/_start</code></td><td>start: score now + re-score every <code class="inline">frequency</code></td></tr>
+ <tr><td><code class="inline">POST</code></td><td><code class="inline">/_ml/datafeeds/{id}/_stop</code></td><td>stop and abort the background scorer</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_ml/anomaly_detectors/{job}/results/records</code></td><td>stored anomaly records; <code class="inline">record_score</code> / <code class="inline">size</code> filters</td></tr>
+ <tr><td><code class="inline">GET</code></td><td><code class="inline">/_cat/ml/datafeeds</code></td><td>one line per datafeed: <code class="inline">id state job_id</code></td></tr>
+ </tbody>
+ </table>
+
+ <p>See <a href="/docs/recipes/anomaly-detection.html">Detect a spike in a metric series</a> for the detector model and the scoring math these records come from.</p>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/hybrid-search.html b/landing/docs/recipes/hybrid-search.html
new file mode 100644
index 000000000..1646d232a
--- /dev/null
+++ b/landing/docs/recipes/hybrid-search.html
@@ -0,0 +1,343 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Hybrid search</title>
+<meta name="description" content="Recipe · Hybrid search — fuse BM25 keyword and dense-vector kNN in a single XERJ hybrid query with Reciprocal Rank Fusion, no second datastore.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class="active"><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>HYBRID SEARCH
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 06</span></div>
+ <h1>Hybrid search</h1>
+
+
+ <h2>The problem</h2>
+ <p>You run a help-desk search box. A user types <strong>"reset password"</strong>. Two things are true at once:</p>
+ <ul>
+ <li>The best answer might share <strong>no keywords</strong> with the query. An article titled <em>"Regain entry to a locked-out account"</em> is exactly what they need, but BM25 never sees it — there's no lexical overlap.</li>
+ <li>A keyword-exact article might be <strong>off-topic</strong>. <em>"Password complexity and rotation policy"</em> contains "password," so BM25 loves it, but a semantic ranker knows it's about policy, not recovery.</li>
+ </ul>
+ <p>Keyword search (BM25) is precise on exact terms and useless on synonyms. Vector search (kNN) captures meaning but drops exact-term matches whose embeddings drift. The usual "fix" is to run <strong>two systems</strong> — a lexical engine and a vector DB — then stitch and re-rank the results in your application. That's two deployments, two writes on every ingest, and a fusion step you have to build and maintain yourself.</p>
+
+ <h2>Why XERJ</h2>
+ <p>XERJ indexes the text field and the <code class="inline">dense_vector</code> field in the <strong>same index</strong>, and fuses BM25 and kNN in a <strong>single <code class="inline">hybrid</code> query</strong>. One request goes out, one ranked list comes back — already fused with Reciprocal Rank Fusion (RRF). No second datastore, no client-side re-ranking.</p>
+
+ <h2>The solution</h2>
+
+ <h3>1. One index, two modalities</h3>
+ <p>A <code class="inline">text</code> field for BM25 and a <code class="inline">dense_vector</code> field for kNN:</p>
+<pre class="code">PUT /helpdesk
+{
+ "mappings": {
+ "properties": {
+ "title": { "type": "text" },
+ "vec": { "type": "dense_vector", "dims": 4, "similarity": "cosine" }
+ }
+ }
+}</pre>
+ <p>The vectors in this recipe are hand-authored 4-dim <em>topic</em> vectors so the demo is deterministic and you can see exactly why each result ranks where it does. In production you fill <code class="inline">vec</code> with a real embedding model — or skip the vectors entirely and use a <code class="inline">semantic_text</code> field, which auto-embeds on ingest. (XERJ's built-in embedder is lexical, good for demos and keyword-semantic overlap; point <code class="inline">inference_id</code> at an external <code class="inline">/v1/embeddings</code> endpoint for neural-quality vectors.)</p>
+
+ <h3>2. The corpus</h3>
+ <p>Each doc has a title (for BM25) and a topic vector (for kNN). Topic axes are <code class="inline">[auth_recovery, security_policy, cooking, generic]</code>:</p>
+ <table>
+ <thead>
+ <tr><th>id</th><th>title</th><th>vector</th><th>keyword "password"?</th><th>near query vector?</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>d1</td><td>Reset your password</td><td><code class="inline">[1.00, 0.15, 0, 0.10]</code></td><td>yes</td><td>yes</td></tr>
+ <tr><td>d2</td><td>Regain entry to a locked-out account</td><td><code class="inline">[0.95, 0.10, 0, 0.15]</code></td><td><strong>no</strong></td><td>yes</td></tr>
+ <tr><td>d3</td><td>Password complexity and rotation policy</td><td><code class="inline">[0.15, 1.00, 0, 0.10]</code></td><td>yes</td><td><strong>no</strong></td></tr>
+ <tr><td>d4</td><td>How to bake sourdough bread</td><td><code class="inline">[0.00, 0.00, 1.0, 0.10]</code></td><td>no</td><td>no</td></tr>
+ <tr><td>d5</td><td>Change your account password</td><td><code class="inline">[0.85, 0.25, 0, 0.20]</code></td><td>yes</td><td>yes</td></tr>
+ </tbody>
+ </table>
+ <p>The user's intent in both modalities: text <code class="inline">"reset password"</code>, vector <code class="inline">[1.0, 0.20, 0.0, 0.10]</code> (an "auth recovery" direction).</p>
+
+ <h3>3. Watch each modality fail on its own</h3>
+ <p><strong>Pure BM25</strong> — <code class="inline">{"match": {"title": "reset password"}}</code>:</p>
+<pre class="code">d1 score=0.5754 Reset your password
+d3 score=0.2877 Password complexity and rotation policy
+d5 score=0.2877 Change your account password</pre>
+ <p>It <strong>misses d2</strong> entirely — "Regain entry to a locked-out account" has no shared keywords, so it can never be a BM25 hit.</p>
+ <p><strong>Pure kNN</strong> — <code class="inline">{"knn": {"field": "vec", "query_vector": [...], "k": 3}}</code>, showing the 3 nearest:</p>
+<pre class="code">d1 score=0.9994 Reset your password
+d2 score=0.9971 Regain entry to a locked-out account
+d5 score=0.9942 Change your account password</pre>
+ <p>It surfaces d2 (great!) but <strong>misses d3</strong> — the password-policy article's topic vector points at "security_policy," far from the query, so it falls below the top-3 cutoff.</p>
+
+ <h3>4. Hybrid recovers both — one query</h3>
+<pre class="code">POST /helpdesk/_search
+{
+ "size": 5,
+ "query": {
+ "hybrid": {
+ "queries": [
+ { "query": { "match": { "title": "reset password" } }, "weight": 1.0 },
+ { "query": { "knn": { "field": "vec",
+ "query_vector": [1.0, 0.2, 0.0, 0.1],
+ "k": 3 } }, "weight": 1.0 }
+ ],
+ "fusion": "rrf"
+ }
+ }
+}</pre>
+ <p>Real response (trimmed to <code class="inline">title</code>, printed verbatim by the script):</p>
+<pre class="code">{
+ "hits": {
+ "total": { "value": 4, "relation": "eq" },
+ "max_score": 0.03279,
+ "hits": [
+ { "_id": "d1", "_score": 0.03279, "_source": { "title": "Reset your password" } },
+ { "_id": "d5", "_score": 0.03175, "_source": { "title": "Change your account password" } },
+ { "_id": "d3", "_score": 0.01613, "_source": { "title": "Password complexity and rotation policy" } },
+ { "_id": "d2", "_score": 0.01613, "_source": { "title": "Regain entry to a locked-out account" } }
+ ]
+ }
+}</pre>
+ <p><strong>d2</strong> (only kNN found it) and <strong>d3</strong> (only BM25 found it) are now <em>both</em> on the page, and <strong>d1</strong> — the doc that matched on <em>both</em> keyword and vector — is still ranked #1. Watch <strong>d5</strong>: neither BM25 nor kNN ranks it better than #3, yet because <em>both</em> signals agree on it, fusion promotes it to <strong>#2</strong> — ahead of d3 and d2, each of which is strong in only one modality. That's the whole point: fusion rewards agreement between the two signals while still admitting the strong single-signal hits that either method alone would have dropped.</p>
+ <p>Only <strong>four</strong> docs come back, not five: d4 ("How to bake sourdough bread") is in <em>neither</em> sub-query's result set — it shares no keywords and its topic vector falls outside the kNN <code class="inline">k:3</code> cutoff — so RRF never sees it. Fusion ranks the <em>union</em> of the sub-query hits, nothing more.</p>
+
+ <h2>How the fusion works</h2>
+ <p><code class="inline">"fusion": "rrf"</code> uses Reciprocal Rank Fusion: each sub-query contributes <code class="inline">weight / (k + rank)</code> for a doc (default <code class="inline">k = 60</code>, <code class="inline">rank</code> is 1-based), summed across sub-queries. It ranks by <em>position</em>, not raw score, so BM25's <code class="inline">~0.5</code> scores and kNN's <code class="inline">~0.99</code> cosines never have to be normalized onto a common scale — a persistent headache when you fuse two systems yourself. The scores above fall straight out of this formula:</p>
+ <ul>
+ <li><strong>d1</strong> is rank 1 in <em>both</em> lists → <code class="inline">1/(60+1) + 1/(60+1) = 0.03279</code>.</li>
+ <li><strong>d5</strong> is rank 3 in <em>both</em> lists → <code class="inline">1/63 + 1/63 = 0.03175</code>, still beating either single-list hit because two contributions stack.</li>
+ <li><strong>d3</strong> and <strong>d2</strong> each appear in <em>one</em> list at rank 2 → <code class="inline">1/(60+2) = 0.01613</code> apiece — an exact tie.</li>
+ </ul>
+ <p>Other <code class="inline">fusion</code> options:</p>
+ <ul>
+ <li><code class="inline">"rrf"</code> or <code class="inline">{"type": "rrf", "k": 40}</code> — rank-based, the safe default.</li>
+ <li><code class="inline">"linear"</code> — weighted sum of the raw sub-query scores (use <code class="inline">weight</code> to tilt toward keyword or vector; requires comparable score scales).</li>
+ </ul>
+ <p>Per-query <code class="inline">weight</code> lets you bias the blend, e.g. <code class="inline">1.5</code> on the <code class="inline">match</code> sub-query to favor exact terms.</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>No dependencies beyond the Python 3 standard library — no pip install, no API keys, no external service. Point it at a running XERJ:</p>
+<pre class="code"># 1. start a throwaway XERJ (insecure, local data dir) on the default port 9200
+xerj --insecure --data-dir /tmp/xerj-hybrid \
+ --config &lt;(printf '[server]\nes_compat_port = 9200\n')
+
+# 2. in another shell, run the example (defaults to http://localhost:9200)
+python3 docs/examples/hybrid-search/hybrid_search.py</pre>
+ <p>The script reads its target from <code class="inline">XERJ_URL</code> (default <code class="inline">http://localhost:9200</code>); the legacy <code class="inline">BASE</code> alias still works. To hit a server on another port:</p>
+<pre class="code">XERJ_URL=http://localhost:9485 python3 docs/examples/hybrid-search/hybrid_search.py</pre>
+ <p>Expected tail (verified live):</p>
+<pre class="code">--- assertions ---
+PASS BM25 alone MISSES d2 (locked-out account: no shared keywords)
+PASS kNN alone MISSES d3 (password policy: topic vector too far)
+PASS Hybrid surfaces BOTH d2 and d3 in a single query
+PASS d1 (keyword + vector match) still ranks #1 under fusion
+
+BM25 ids : ['d1', 'd3', 'd5']
+kNN ids : ['d1', 'd2', 'd5']
+Hybrid ids: ['d1', 'd5', 'd2', 'd3']
+
+OK</pre>
+ <p>The four assertions and the scores are deterministic; the BM25 and kNN id lists are stable, and the hybrid list always starts <code class="inline">['d1', 'd5', …]</code>. The <strong>only</strong> run-to-run wobble is the last two ids — <strong>d3 and d2 tie at exactly <code class="inline">0.01613</code></strong>, so they swap freely between positions #3 and #4 (across a dozen runs we saw both <code class="inline">d2, d3</code> and <code class="inline">d3, d2</code>). The recipe's point — that d2 and d3 both appear and d1 stays #1 — holds every time.</p>
+ <p>See the full runnable example — <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/hybrid-search/hybrid_search.py">docs/examples/hybrid-search/hybrid_search.py</a> on GitHub.</p>
+
+ <h2>Notes &amp; limits</h2>
+ <ul>
+ <li><strong><code class="inline">knn</code> in a query scores every doc that has the field</strong>, ranked by cosine; <code class="inline">size</code> (or <code class="inline">from</code>+<code class="inline">size</code>) is the cutoff the user sees. So <code class="inline">k:3</code> plus <code class="inline">size:3</code> means "show the 3 nearest." For a hard candidate cap independent of <code class="inline">size</code>, keep <code class="inline">k</code> small — it's carried on the sub-query.</li>
+ <li><strong>Score scales differ by fusion.</strong> RRF returns small fused scores (<code class="inline">0.016–0.033</code> here) — compare docs <em>within</em> a response, not against BM25/cosine absolutes.</li>
+ <li><strong>Tie ordering is not guaranteed</strong> for docs with identical fused scores. d3 and d2 both score exactly <code class="inline">0.01613</code> here (each is a single rank-2 hit in one sub-query), and they genuinely swap between positions #3 and #4 from one run to the next — we observed both orders across a dozen runs. Set membership — the point of this recipe — is stable; the order <em>among exact ties</em> is not.</li>
+ <li><strong>Vector quality is your embeddings' job.</strong> This recipe supplies vectors directly for a deterministic demo. For real semantic recall, generate <code class="inline">dense_vector</code> values with a production embedding model, or use a <code class="inline">semantic_text</code> field with an external <code class="inline">inference_id</code>.</li>
+ </ul>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipe · Hybrid search</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/index.html b/landing/docs/recipes/index.html
new file mode 100644
index 000000000..fccd354af
--- /dev/null
+++ b/landing/docs/recipes/index.html
@@ -0,0 +1,265 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipes</title>
+<meta name="description" content="Recipes — XERJ.ai documentation.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class="active"><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span>RECIPES
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPES</span></div>
+ <h1>Recipes</h1>
+
+
+ <p>Task-oriented AI &amp; search recipes for building real things with XERJ — retrieval by meaning, agent memory, hybrid ranking, log analytics, and anomaly detection. Each recipe was verified end-to-end against a live XERJ before it was written, and ships with a runnable, dependency-free example.</p>
+
+ <div class="recipes">
+ <a class="recipe" href="/docs/recipes/semantic-search-rag.html">
+ <span class="num">01</span>
+ <span class="title">Semantic search &amp; RAG</span>
+ <p class="lead">Retrieval by meaning with <code class="inline">semantic_text</code> — auto-embed on ingest, no separate vector DB.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/agentic-memory.html">
+ <span class="num">02</span>
+ <span class="title">Give an AI agent long-term memory</span>
+ <p class="lead">A memory-backed agent on the <code class="inline">/_memory</code> API — store, semantic + keyword recall, metadata filters, forgetting, per-agent isolation.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/passage-retrieval.html">
+ <span class="num">03</span>
+ <span class="title">Passage retrieval on long docs</span>
+ <p class="lead"><code class="inline">semantic_text</code> auto-embeds every overlapping passage; a long doc competes on any one of its sections via best-passage (max-sim) scoring — 98% top-3 vs 32% pooled.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/vector-search-knn.html">
+ <span class="num">04</span>
+ <span class="title">Vector search (kNN)</span>
+ <p class="lead">Nearest-neighbor similarity search over <code class="inline">dense_vector</code> (HNSW), with filters.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/vector-quantization.html">
+ <span class="num">05</span>
+ <span class="title">Vector quantization</span>
+ <p class="lead">Opt a <code class="inline">dense_vector</code> field into scalar8 (<code class="inline">int8_hnsw</code>) — 4× smaller vectors, recall@10 ≈ 0.99.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/hybrid-search.html">
+ <span class="num">06</span>
+ <span class="title">Hybrid search</span>
+ <p class="lead">Keyword + vector in one query — results neither BM25 nor kNN finds alone.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/log-analytics.html">
+ <span class="num">07</span>
+ <span class="title">Log analytics</span>
+ <p class="lead">From raw logs to dashboards — error rates, p95 latency, top services via aggregations.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/anomaly-detection.html">
+ <span class="num">08</span>
+ <span class="title">Anomaly detection</span>
+ <p class="lead">Statistical <code class="inline">_ml</code> detectors that flag spikes in metrics/logs.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/continuous-anomaly-datafeeds.html">
+ <span class="num">09</span>
+ <span class="title">Continuous anomaly datafeeds</span>
+ <p class="lead">A live <code class="inline">_ml</code> datafeed that re-scores an index on a timer and stores new anomaly records you poll.</p>
+ </a>
+ <a class="recipe" href="/docs/recipes/migrate-from-elasticsearch.html">
+ <span class="num">10</span>
+ <span class="title">Migrate from Elasticsearch</span>
+ <p class="lead">Point your existing ES client at XERJ — same wire, change the URL.</p>
+ </a>
+ </div>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipes</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/log-analytics.html b/landing/docs/recipes/log-analytics.html
new file mode 100644
index 000000000..54dff36e0
--- /dev/null
+++ b/landing/docs/recipes/log-analytics.html
@@ -0,0 +1,349 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Log analytics</title>
+<meta name="description" content="Bulk-ingest structured application logs into XERJ and answer error-rate, latency-percentile, and top-service questions with Elasticsearch-compatible aggregations.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class="active"><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>LOG ANALYTICS
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 07</span></div>
+ <h1>Log analytics</h1>
+
+
+ <p><strong>Goal:</strong> You have a stream of structured application logs — timestamp, level, service, latency, status — and you need to answer the questions an on-call engineer actually asks: <em>Is the error rate climbing? Which service owns the latency tail? Who's taking the most traffic?</em> This recipe bulk-ingests a few hundred synthetic log events and answers all three with plain Elasticsearch aggregations against a single XERJ instance — no separate metrics store, no second query language.</p>
+
+ <p>Everything below was run end-to-end against a live XERJ. The numbers and JSON are the real captured output.</p>
+
+ <h2>Why XERJ for this</h2>
+ <p>XERJ speaks the Elasticsearch wire protocol, so the aggregation surface you already know — <code class="inline">date_histogram</code>, <code class="inline">percentiles</code>, <code class="inline">terms</code>, <code class="inline">stats</code>, and <code class="inline">filter</code> sub-aggs — works as-is. You ingest with <code class="inline">_bulk</code> and query with <code class="inline">_search</code>. One Rust engine handles the logs, the aggregations, and (if you want them later) full-text and vector search on the same documents. No Logstash/metrics-store split to operate.</p>
+
+ <h2>Set up the index</h2>
+ <p>Give the log fields explicit types up front. <code class="inline">@timestamp</code> must be a <code class="inline">date</code> for <code class="inline">date_histogram</code>, <code class="inline">latency_ms</code>/<code class="inline">status</code> numeric for math, and <code class="inline">service</code>/<code class="inline">level</code> <code class="inline">keyword</code> so they bucket exactly instead of being analyzed.</p>
+<pre class="code">curl -XPUT localhost:9200/logs-app -H 'Content-Type: application/json' -d '{
+ "mappings": { "properties": {
+ "@timestamp": {"type": "date"},
+ "level": {"type": "keyword"},
+ "service": {"type": "keyword"},
+ "latency_ms": {"type": "integer"},
+ "status": {"type": "integer"},
+ "message": {"type": "text"}
+ }}
+}'</pre>
+
+ <h2>Ingest with <code class="inline">_bulk</code></h2>
+ <p>Logs arrive in volume, so use the bulk API: alternating action + document NDJSON lines. <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/log-analytics/log_analytics.py">The example script</a> generates 600 events across 6 hours and 4 services (<code class="inline">checkout</code>, <code class="inline">search</code>, <code class="inline">catalog</code>, <code class="inline">payments</code>), each with its own baseline latency and error propensity so the aggregations tell a real story. One <code class="inline">_bulk</code> call ships them all:</p>
+<pre class="code">POST /_bulk (Content-Type: application/x-ndjson)
+{"index":{"_index":"logs-app"}}
+{"@timestamp":"2026-07-06T08:14:03+00:00","level":"INFO","service":"search","latency_ms":61,"status":200,"message":"search handled request status=200"}
+{"index":{"_index":"logs-app"}}
+{"@timestamp":"2026-07-06T08:22:41+00:00","level":"ERROR","service":"payments","latency_ms":740,"status":503,"message":"payments handled request status=503"}
+...</pre>
+
+ <p>Check <code class="inline">errors</code> in the response is <code class="inline">false</code>, then <code class="inline">_refresh</code> to make the docs searchable. <code class="inline">GET /logs-app/_count</code> confirms 600 landed.</p>
+
+ <h2>Q1 — Error rate over time</h2>
+ <p>Bucket events by hour with <code class="inline">date_histogram</code>, and inside each bucket count the ERROR events with a <code class="inline">filter</code> sub-agg. <code class="inline">errors.doc_count / doc_count</code> is the error rate for that hour — exactly the shape a dashboard panel needs.</p>
+<pre class="code">POST /logs-app/_search
+{
+ "size": 0,
+ "aggs": {
+ "per_hour": {
+ "date_histogram": { "field": "@timestamp", "fixed_interval": "1h" },
+ "aggs": {
+ "errors": { "filter": { "term": { "level": "ERROR" } } }
+ }
+ }
+ }
+}</pre>
+
+ <p><code class="inline">size: 0</code> means "no hits, just the aggregations." Real response (first two buckets, <code class="inline">took</code> in ms):</p>
+<pre class="code">{
+ "took": 4,
+ "buckets": [
+ { "key_as_string": "2026-07-06T08:00:00.000Z", "doc_count": 102,
+ "errors": { "doc_count": 7 } },
+ { "key_as_string": "2026-07-06T09:00:00.000Z", "doc_count": 101,
+ "errors": { "doc_count": 3 } }
+ ]
+}</pre>
+
+ <p>Rolled up across all six buckets:</p>
+<pre class="code">hour (UTC) total errors err_rate
+08:00 102 7 6.9%
+09:00 101 3 3.0%
+10:00 106 5 4.7%
+11:00 91 2 2.2%
+12:00 93 2 2.2%
+13:00 107 5 4.7%</pre>
+
+ <h2>Q2 — Latency percentiles (p50 / p95 / p99)</h2>
+ <p>Averages hide tail latency; percentiles don't. Ask for fleet-wide percentiles, and break out p95 per service with a <code class="inline">terms</code> + <code class="inline">percentiles</code> sub-agg to see who owns the tail.</p>
+<pre class="code">POST /logs-app/_search
+{
+ "size": 0,
+ "aggs": {
+ "latency": { "percentiles": { "field": "latency_ms", "percents": [50, 95, 99] } },
+ "by_service": {
+ "terms": { "field": "service" },
+ "aggs": { "p95": { "percentiles": { "field": "latency_ms", "percents": [95] } } }
+ }
+ }
+}</pre>
+
+ <p>The fleet-wide block comes back as ES-style keyed percentiles:</p>
+<pre class="code">{ "latency": { "values": { "50.0": 56.0, "95.0": 321.15, "99.0": 565.22 } } }</pre>
+
+ <p>Per-service p95 makes the culprits obvious — <code class="inline">checkout</code> and <code class="inline">payments</code> carry the tail while <code class="inline">catalog</code> and <code class="inline">search</code> stay flat:</p>
+<pre class="code">fleet-wide p50=56 p95=321 p99=565
+service p95 latency
+catalog 51
+search 79
+checkout 447
+payments 529</pre>
+
+ <h2>Q3 — Top services by volume (with latency stats)</h2>
+ <p>One <code class="inline">terms</code> agg ranks services by event count; a <code class="inline">stats</code> sub-agg attaches count/avg/min/max latency to each in the same round trip — leaderboard and latency profile from a single query.</p>
+<pre class="code">POST /logs-app/_search
+{
+ "size": 0,
+ "aggs": {
+ "top_services": {
+ "terms": { "field": "service", "size": 10, "order": { "_count": "desc" } },
+ "aggs": { "lat": { "stats": { "field": "latency_ms" } } }
+ }
+ }
+}</pre>
+
+<pre class="code">service volume avg_ms min max
+catalog 190 35 15 118
+search 187 51 22 114
+checkout 150 167 60 590
+payments 73 269 103 958</pre>
+
+ <p><code class="inline">catalog</code> and <code class="inline">search</code> take the most traffic but are cheap; <code class="inline">payments</code> is low-volume but has the worst worst-case (958 ms). That's the whole triage picture from three <code class="inline">_search</code> calls.</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>The tables above are the real, captured output of this exact script. The dataset is generated with a fixed seed (<code class="inline">random.seed(7)</code>), so the counts, error rates, percentiles, and per-service tables are <strong>deterministic</strong> — you will get the same numbers shown here. The only run-to-run variance is <code class="inline">took</code> (per-query latency), which stays in the single-digit milliseconds (this run: Q1 <code class="inline">took=4 ms</code>, Q2 <code class="inline">took=5 ms</code>).</p>
+<pre class="code"># 1. Start XERJ on its default port (9200), insecure/local — no config needed
+./engine/target/release/xerj --insecure --data-dir /tmp/xerj-logs &amp;
+
+# 2. Run the recipe (stdlib only — no pip installs, no third-party network calls)
+python3 docs/examples/log-analytics/log_analytics.py</pre>
+
+ <p>The client reads the server URL from <code class="inline">$XERJ_URL</code> (default <code class="inline">http://localhost:9200</code>). A positional argument still overrides it if you run XERJ on a different port, e.g. <code class="inline">python3 docs/examples/log-analytics/log_analytics.py http://localhost:9483</code>.</p>
+
+ <p>The script creates the mapping, bulk-ingests 600 events, runs all three queries, and prints the tables above. It asserts the ingest count and that <code class="inline">_bulk</code> reported no errors, so a green run means the aggregations are real.</p>
+
+ <p>A green run prints the three per-question tables shown above and ends with <code class="inline">All aggregations returned.</code> — the deterministic headline numbers it produces, summarized:</p>
+<pre class="code">Ingested 600 log events into 'logs-app'
+
+Q1 hourly error rate: 08:00 6.9% · 09:00 3.0% · 10:00 4.7% · 11:00 2.2% · 12:00 2.2% · 13:00 4.7%
+Q2 fleet latency: p50=56 ms p95=321 ms p99=565 ms (per-service p95: catalog 51, search 79, checkout 447, payments 529)
+Q3 top services: catalog 190 · search 187 · checkout 150 · payments 73 (payments worst-case 958 ms)</pre>
+
+ <h2>Notes and honest limits</h2>
+ <ul>
+ <li>These aggregations are computed on demand per query — XERJ is not running a continuous rollup or a background job. That's exactly what you want for ad-hoc dashboards and alerting queries; if you need pre-materialized rollups at very high cardinality, aggregate on a schedule and index the results.</li>
+ <li><code class="inline">fixed_interval: "1h"</code> gives evenly spaced buckets; use <code class="inline">calendar_interval</code> (<code class="inline">"day"</code>, <code class="inline">"month"</code>) when you want calendar-aware boundaries and DST handling.</li>
+ <li>Percentiles use an approximate (t-digest-style) algorithm, matching ES semantics — the values are estimates, not exact order statistics, which is why p95 reads as <code class="inline">321.15</code> rather than a whole millisecond.</li>
+ <li>Same documents, same engine: because <code class="inline">message</code> is a <code class="inline">text</code> field you can add <code class="inline">match</code>/<code class="inline">match_phrase</code> full-text filters to any of these queries (e.g. only aggregate logs matching <code class="inline">"timeout"</code>) without moving data anywhere.</li>
+ </ul>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipe · Log analytics</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/migrate-from-elasticsearch.html b/landing/docs/recipes/migrate-from-elasticsearch.html
new file mode 100644
index 000000000..8f8382f52
--- /dev/null
+++ b/landing/docs/recipes/migrate-from-elasticsearch.html
@@ -0,0 +1,392 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Migrate from Elasticsearch</title>
+<meta name="description" content="Recipe · Migrate from Elasticsearch to XERJ by pointing your client's base URL at XERJ — it speaks the ES REST wire protocol on :9200, so your queries, bulk loads, and dashboards work unchanged.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class="active"><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>MIGRATE FROM ELASTICSEARCH
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 10</span></div>
+ <h1>Migrate from Elasticsearch</h1>
+
+
+ <p><strong>Use case:</strong> You have a service that talks to Elasticsearch — it creates indices with mappings, bulk-loads documents, runs <code class="inline">match</code>/<code class="inline">term</code>/<code class="inline">range</code>/<code class="inline">bool</code> searches, computes <code class="inline">terms</code> aggregations, and checks <code class="inline">_cat/indices</code> in ops dashboards. You want to move to XERJ without rewriting any of that.</p>
+
+ <p><strong>The whole migration is one line:</strong> point your client's base URL at XERJ. XERJ speaks the Elasticsearch REST wire protocol on the same <code class="inline">:9200</code>, so the exact JSON your app already sends works unchanged. No SDK swap, no query rewrites, no re-mapping.</p>
+
+<pre class="code">- ES_URL = "http://elasticsearch:9200"
++ ES_URL = "http://xerj:9200"</pre>
+
+ <p>This recipe proves it by running the standard ES request shapes — verbatim — against a live XERJ and showing the real responses.</p>
+
+ <h2>Why XERJ for this</h2>
+ <ul>
+ <li><strong>Same wire, same client.</strong> The official <code class="inline">elasticsearch-py</code>, <code class="inline">@elastic/elasticsearch</code>, or a raw <code class="inline">curl</code> all work because XERJ implements the ES REST API surface. XERJ even reports itself as version <code class="inline">8.13.0</code> at <code class="inline">GET /</code>, so version-sniffing clients connect cleanly.</li>
+ <li><strong>Faster on the same workload.</strong> On an identical corpus and machine, XERJ beats a real Elasticsearch 8.13 on both ingest and reads — e.g. bulk ingest ~1.5–1.7× and <code class="inline">match</code> queries ~2.5× lower p50 latency (see <a href="#benchmarks">Benchmarks</a>).</li>
+ <li><strong>Honest scope.</strong> XERJ is <em>wire-compatible</em>, not a byte-for-byte fork. As of the last full run it passes <strong>1,325 / 1,326</strong> executed cases of the 1,329-case ES REST conformance suite (3 skipped, 1 known fail). Response <em>shapes</em> match; some internal details (exact BM25 float scores, segment-merge timing) are XERJ's own. See <a href="#limitations-be-honest">Limitations</a>.</li>
+ </ul>
+
+ <h2>The working solution</h2>
+ <p>Everything below is a plain <code class="inline">curl</code> in the exact shape you'd send Elasticsearch. The only variable is <code class="inline">$ES</code>.</p>
+
+ <h3>1. Create an index with a mapping — <code class="inline">PUT /products</code></h3>
+<pre class="code">curl -s -X PUT "$ES/products" -H 'Content-Type: application/json' -d '{
+ "mappings": {
+ "properties": {
+ "name": { "type": "text" },
+ "brand": { "type": "keyword" },
+ "price": { "type": "float" },
+ "in_stock": { "type": "boolean" }
+ }
+ }
+}'</pre>
+
+ <p>Response — the standard ES acknowledgement:</p>
+<pre class="code">{ "acknowledged": true, "shards_acknowledged": true, "index": "products" }</pre>
+
+ <h3>2. Bulk-load documents — <code class="inline">POST /_bulk</code></h3>
+ <p>Standard NDJSON: an action line, then a source line, repeated. <code class="inline">Content-Type: application/x-ndjson</code>, trailing newline.</p>
+<pre class="code">curl -s -X POST "$ES/_bulk" -H 'Content-Type: application/x-ndjson' --data-binary '
+{"index":{"_index":"products","_id":"1"}}
+{"name":"Aluminum water bottle","brand":"Klean","price":24.99,"in_stock":true}
+{"index":{"_index":"products","_id":"2"}}
+{"name":"Insulated steel water bottle","brand":"Hydro","price":39.95,"in_stock":true}
+... 4 more ...
+'</pre>
+
+ <p>Response is the ES bulk envelope (<code class="inline">{"took":..,"errors":false,"items":[...]}</code>) — here, <code class="inline">errors: false, items: 6</code>.</p>
+
+ <blockquote><p>As in Elasticsearch, freshly indexed docs become searchable after a refresh. Call <code class="inline">POST /products/_refresh</code> (or wait for the interval) before the search steps.</p></blockquote>
+
+ <h3>3. Full-text <code class="inline">match</code> — <code class="inline">POST /products/_search</code></h3>
+<pre class="code">curl -s "$ES/products/_search" -H 'Content-Type: application/json' -d '{
+ "query": { "match": { "name": "water bottle" } },
+ "_source": ["name","brand","price"]
+}'</pre>
+
+ <p>Real result — BM25-ranked, standard <code class="inline">hits.total.value</code> / <code class="inline">_score</code> shape (exact captured values):</p>
+<pre class="code">total: 4 max_score: 0.5754
+ 0.575 Aluminum water bottle
+ 0.575 Insulated steel water bottle
+ 0.288 Glass water carafe
+ 0.288 Plastic sports bottle</pre>
+
+ <p>Note the classic OR semantics of <code class="inline">match</code>: "Glass water carafe" matches only "water" and "Plastic sports bottle" matches only "bottle", so each scores <code class="inline">0.288</code> and ranks below the two docs that match both terms (<code class="inline">0.575</code>). The full hit shape is exactly ES's:</p>
+<pre class="code">{
+ "hits": {
+ "total": { "value": 4, "relation": "eq" },
+ "max_score": 0.5753642320632935,
+ "hits": [
+ { "_index": "products", "_id": "1", "_score": 0.5753642320632935,
+ "_source": { "name": "Aluminum water bottle", "brand": "Klean", "price": 24.99 } }
+ ]
+ }
+}</pre>
+
+ <h3>4. The classic <code class="inline">bool</code> combo — <code class="inline">must</code> + <code class="inline">terms</code> filter + <code class="inline">range</code> filter</h3>
+ <p>The bread-and-butter Elasticsearch query: full-text relevance in <code class="inline">must</code>, non-scoring constraints in <code class="inline">filter</code>.</p>
+<pre class="code">curl -s "$ES/products/_search" -H 'Content-Type: application/json' -d '{
+ "query": {
+ "bool": {
+ "must": [ { "match": { "name": "bottle" } } ],
+ "filter": [
+ { "terms": { "brand": ["Hydro","Klean"] } },
+ { "range": { "price": { "gte": 10, "lte": 40 } } }
+ ]
+ }
+ },
+ "_source": ["name","brand","price"]
+}'</pre>
+
+ <p>Real result — only the docs that match the text <strong>and</strong> pass both filters:</p>
+<pre class="code">total: 2
+ Klean 24.99 Aluminum water bottle
+ Hydro 39.95 Insulated steel water bottle</pre>
+
+ <p>(The Klean "Plastic sports bottle" is excluded — its price <code class="inline">9.99</code> is below the <code class="inline">10</code> floor.)</p>
+
+ <h3>5. <code class="inline">terms</code> aggregation — <code class="inline">POST /products/_search</code> with <code class="inline">size: 0</code></h3>
+<pre class="code">curl -s "$ES/products/_search" -H 'Content-Type: application/json' -d '{
+ "size": 0,
+ "aggs": { "by_brand": { "terms": { "field": "brand" } } }
+}'</pre>
+
+ <p>Real result — the standard <code class="inline">buckets</code> shape with <code class="inline">doc_count_error_upper_bound</code> and <code class="inline">sum_other_doc_count</code>:</p>
+<pre class="code">{
+ "hits": { "total": { "value": 6, "relation": "eq" }, "hits": [] },
+ "aggregations": {
+ "by_brand": {
+ "doc_count_error_upper_bound": 0,
+ "sum_other_doc_count": 0,
+ "buckets": [
+ { "key": "Bodum", "doc_count": 2 },
+ { "key": "Hydro", "doc_count": 2 },
+ { "key": "Klean", "doc_count": 2 }
+ ]
+ }
+ }
+}</pre>
+
+ <h3>6. Ops check — <code class="inline">GET /_cat/indices?v</code></h3>
+ <p>The human-readable <code class="inline">_cat</code> table your dashboards and shell scripts parse. The columns are ES's order — <code class="inline">health status index uuid pri rep docs.count docs.deleted store.size pri.store.size</code>:</p>
+<pre class="code">green open products 0ddfa388-df97-4b4b-9c9d-b9782b1b493a 1 0 6 0 10901b 10901b</pre>
+
+ <p>Two honest deltas from Elasticsearch here:</p>
+ <ul>
+ <li><strong><code class="inline">?v</code> does not emit a column-header row.</strong> XERJ returns the data rows only, even with <code class="inline">?v</code>. The column <em>order</em> is ES's, so anything parsing by position keeps working; anything that keys off the header line does not.</li>
+ <li><strong>No per-index <code class="inline">_cat</code> path.</strong> XERJ serves the whole-cluster <code class="inline">GET /_cat/indices</code> (which, like ES's own <code class="inline">.security</code>/<code class="inline">.kibana</code> dot-indices, also lists XERJ's internal <code class="inline">.xerj_*</code> system indices). The per-index form <code class="inline">GET /_cat/indices/products</code> returns <strong>404</strong> in this build, so filter client-side instead — e.g. <code class="inline">curl -s "$ES/_cat/indices?v" | grep ' products '</code>.</li>
+ </ul>
+ <p>(The <code class="inline">uuid</code> column is a fresh per-response value in this build — treat it as illustrative, not stable.)</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>The full script is <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/migrate-from-elasticsearch/migrate_demo.sh"><code class="inline">docs/examples/migrate-from-elasticsearch/migrate_demo.sh</code></a> — stdlib-only (<code class="inline">curl</code> + <code class="inline">python3</code> as a JSON pretty-printer, no third-party packages, no external network calls). Boot XERJ and run every step above end-to-end:</p>
+<pre class="code"># 1. Boot XERJ (insecure = no TLS/auth, for local demo). ES-wire on :9200 by default.
+xerj --insecure --data-dir /tmp/xerj-demo &amp;
+
+# 2. Run the standard-ES demo against it — the ONLY change is the URL.
+# ES is the documented knob; XERJ_URL is accepted as an alias.
+ES=http://localhost:9200 bash docs/examples/migrate-from-elasticsearch/migrate_demo.sh</pre>
+
+ <p>It exits <code class="inline">0</code> and ends with <code class="inline">All standard Elasticsearch calls succeeded against XERJ</code>. The exact numbers this run produces (deterministic on this 6-doc corpus):</p>
+ <table>
+ <thead>
+ <tr><th>Step</th><th>What you see</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>2. <code class="inline">_bulk</code></td><td><code class="inline">errors: false items: 6</code></td></tr>
+ <tr><td>3. <code class="inline">match "water bottle"</code></td><td><code class="inline">total: 4 max_score: 0.5754</code> → <code class="inline">0.575</code> Aluminum, <code class="inline">0.575</code> Insulated, <code class="inline">0.288</code> Glass, <code class="inline">0.288</code> Plastic</td></tr>
+ <tr><td>4. <code class="inline">bool</code> (match + terms + range)</td><td><code class="inline">total: 2</code> → Klean 24.99 Aluminum, Hydro 39.95 Insulated</td></tr>
+ <tr><td>5. <code class="inline">terms</code> agg by brand</td><td><code class="inline">total docs: 6</code>; buckets Bodum 2, Hydro 2, Klean 2; <code class="inline">doc_count_error_upper_bound: 0</code>, <code class="inline">sum_other_doc_count: 0</code></td></tr>
+ <tr><td>6. <code class="inline">_cat/indices</code> products row</td><td><code class="inline">docs.count 6</code>, <code class="inline">docs.deleted 0</code>, <code class="inline">store.size 10901b</code></td></tr>
+ </tbody>
+ </table>
+
+ <p>The BM25 <code class="inline">_score</code> values and bucket counts are stable run-to-run; only the <code class="inline">_cat</code> <code class="inline">uuid</code> column changes (see step 6). To A/B against a real cluster, run the identical script with <code class="inline">ES=http://your-elasticsearch:9200</code> — same script, same output shape.</p>
+
+ <h2>What to change in your real app</h2>
+ <p>Almost nothing:</p>
+ <ol>
+ <li><strong>Base URL</strong> → your XERJ host. That's the migration.</li>
+ <li><strong>Auth/TLS</strong> → XERJ supports them; the demo uses <code class="inline">--insecure</code> for brevity. Point your client's existing credentials/CA config at XERJ as you would any ES endpoint.</li>
+ <li><strong>Client library</strong> → keep it. <code class="inline">elasticsearch-py</code>, the JS client, Logstash/Beats outputs, or raw HTTP all speak this wire.</li>
+ </ol>
+
+ <h2 id="limitations-be-honest">Limitations (be honest)</h2>
+ <ul>
+ <li><strong>Wire-compatible, not byte-identical.</strong> XERJ passes <strong>1,325 / 1,326</strong> executed cases of the 1,329-case ES REST conformance suite (3 skipped, 1 known fail), last full run. Response <em>structure</em> matches ES; validate the specific endpoints and query types your app depends on against your own data before cutting over. Per-suite conformance and caveats are tracked in <code class="inline">demo/playbooks/ES_COMPATIBILITY.md</code>.</li>
+ <li><strong>Relevance scores are XERJ's own BM25.</strong> Ranking order matches ES intent, but exact <code class="inline">_score</code> float values differ, and can even shift slightly for the <em>same</em> query as background segment merges change collection statistics — the same class of internal difference you'd see comparing two ES minor versions. If you assert on exact scores in tests, relax those assertions.</li>
+ <li><strong>A few query/agg types differ or aren't implemented.</strong> XERJ covers the common set (<code class="inline">match</code>, <code class="inline">term</code>, <code class="inline">terms</code>, <code class="inline">range</code>, <code class="inline">bool</code>, <code class="inline">match_phrase</code>, <code class="inline">multi_match</code>, <code class="inline">terms</code>/<code class="inline">stats</code>/<code class="inline">date_histogram</code>/... aggs). Some ES features are partial or unsupported (e.g. vector-suite conformance is low). Check the compatibility report for your specific needs.</li>
+ </ul>
+
+ <h2 id="benchmarks">Benchmarks</h2>
+ <p>Same corpus, same machine, single node, security off — XERJ vs. a real Elasticsearch 8.13:</p>
+ <table>
+ <thead>
+ <tr><th>Operation</th><th>XERJ</th><th>ES 8.13</th><th>XERJ advantage</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>ingest 1M docs, 1 client (docs/s)</td><td>119,031</td><td>70,320</td><td><strong>1.69×</strong></td></tr>
+ <tr><td>ingest 100k docs, 8 clients (docs/s)</td><td>382,301</td><td>253,961</td><td><strong>1.51×</strong></td></tr>
+ <tr><td><code class="inline">match(model)</code> read (p50 ms)</td><td>0.57</td><td>1.45</td><td><strong>2.53×</strong></td></tr>
+ <tr><td><code class="inline">match_all</code> read (p50 ms)</td><td>0.88</td><td>1.72</td><td><strong>1.94×</strong></td></tr>
+ <tr><td><code class="inline">query_string</code> read (p50 ms)</td><td>1.35</td><td>9.35</td><td><strong>6.92×</strong></td></tr>
+ </tbody>
+ </table>
+
+ <p>Full head-to-head matrix and methodology (identical keep-alive HTTP client applied to both engines): <code class="inline">demo/playbooks/BENCHMARK_VS_ES.md</code>.</p>
+
+ <hr>
+
+ <p class="source-note"><em>Verified end-to-end against a live XERJ (merged <code class="inline">main</code> binary, ES-wire port). Every request/response above is real captured output.</em></p>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/passage-retrieval.html b/landing/docs/recipes/passage-retrieval.html
new file mode 100644
index 000000000..127adc68f
--- /dev/null
+++ b/landing/docs/recipes/passage-retrieval.html
@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Passage retrieval</title>
+<meta name="description" content="Recipe · Passage retrieval — map a field as semantic_text so XERJ embeds every passage on ingest and a long, multi-topic document competes on its best-matching section.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class="active"><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>PASSAGE RETRIEVAL
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 03</span></div>
+ <h1>Passage retrieval</h1>
+
+
+ <h2>The problem</h2>
+ <p>Embeddings describe <em>one</em> piece of text. But real documents — a manual, a contract, a long article, a support-ticket thread — are <em>many</em> topics stitched together. If you embed the whole document into a single vector, you get the <strong>average</strong> of everything it says. A query about one section then has to match that blurred average, and it loses to a short document that is <em>only</em> about that section. The relevant long document is there; your retriever just can't see it.</p>
+ <p>The fix the field settled on is <strong>passage (chunk) embeddings</strong>: split the document into overlapping passages, embed each one, and score the document by its <em>best-matching</em> passage. Most stacks make you build that pipeline yourself — a separate chunker, a vector column per chunk, a nested query — and keep it in sync with your data.</p>
+
+ <h2>Why XERJ</h2>
+ <p>XERJ does it on ingest, with no configuration. A <code class="inline">semantic_text</code> field splits each value into overlapping passages, embeds <strong>every passage</strong>, and persists the per-passage vectors alongside the document. A <code class="inline">semantic</code> query then scores each document by its <strong>best-matching passage</strong> (max-sim) instead of a single pooled vector — so a long document competes on <em>any one</em> of its sections.</p>
+ <p>Short values (a single passage) are unchanged: one vector, exactly as before. The pipeline only kicks in when a value is long enough to span more than one passage, so you pay nothing for short fields.</p>
+
+ <h2>The solution</h2>
+ <p>Nothing to configure — map the field as <code class="inline">semantic_text</code> and index normally:</p>
+<pre class="code">curl -sX PUT "$XERJ_URL/docs" -H 'content-type: application/json' -d '{
+ "mappings": { "properties": { "body": { "type": "semantic_text" } } }
+}'
+
+# A long, multi-topic document — embedded per passage automatically.
+curl -sX PUT "$XERJ_URL/docs/_doc/handbook?refresh=true" \
+ -H 'content-type: application/json' \
+ -d '{ "body": "...many paragraphs across many topics..." }'</pre>
+
+ <p>Query it with <code class="inline">semantic</code> — the question is embedded server-side and scored against the best passage:</p>
+<pre class="code">curl -sX POST "$XERJ_URL/docs/_search" -H 'content-type: application/json' -d '{
+ "query": { "semantic": { "field": "body",
+ "query": "how does chlorophyll drive photosynthesis",
+ "k": 10 } }
+}'</pre>
+
+ <p>The document is retrieved on the strength of the one passage that matches — even if the rest of it is about something else entirely.</p>
+
+ <h2>Try it</h2>
+ <p><a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/passage-retrieval/passage_demo.py"><code class="inline">docs/examples/passage-retrieval/passage_demo.py</code></a> indexes the 40 real KB articles as short docs <strong>plus</strong> one long "compendium" that concatenates all 40, then runs each article's title as a query and measures how often the long compendium reaches the top 3 under each scoring mode. Both arms use XERJ's own embedder — the pooled baseline reads XERJ's whole-document <code class="inline">&lt;field&gt;_vector</code> back out of <code class="inline">_source</code> — so the only variable is pooled-vs-per-passage:</p>
+<pre class="code">$ python3 docs/examples/passage-retrieval/passage_demo.py
+40 short article docs + 1 long compendium of all 40
+
+compendium embedded into 21 passage vectors (pooled into 1 whole-doc vector of 384 dims)
+
+compendium reached the top-3:
+ per-passage : 39/40 (98%)
+ pooled : 13/40 (32%)
+
+OK: per-passage scoring let the long document compete on each of its sections
+ (39/40 top-3); a single pooled vector managed only 13/40.</pre>
+
+ <p>The compendium contains every topic, so with per-passage scoring it competes for almost every query. Averaged into a single vector, it is a mediocre blur that loses to the undiluted short docs two times out of three.</p>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Start XERJ on its default port (<code class="inline">9200</code>) and run the example — no keys, no external services, stdlib Python only:</p>
+<pre class="code"># 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
+python3 docs/examples/passage-retrieval/passage_demo.py</pre>
+ <p>Point it at a non-default host/port with <code class="inline">XERJ_URL=http://host:port</code>. The run is fully deterministic (offline lexical embedder over a fixed 40-article corpus), so every run prints the same numbers:</p>
+<pre class="code">40 short article docs + 1 long compendium of all 40
+
+compendium embedded into 21 passage vectors (pooled into 1 whole-doc vector of 384 dims)
+
+compendium reached the top-3:
+ per-passage : 39/40 (98%)
+ pooled : 13/40 (32%)</pre>
+ <p>Both <code class="inline">39/40</code> and <code class="inline">13/40</code> are computed by the run itself over the 40 title queries — nothing is hardcoded. If either arm regresses (per-passage top-3 rate &lt; 75%, or per-passage failing to beat pooled) the script exits non-zero, so it doubles as a CI gate.</p>
+
+ <h2>How it works</h2>
+ <ul>
+ <li><strong>Chunker.</strong> The built-in overlapping chunker (512-char passages, 64-char overlap) splits the field value; each passage is embedded with the same embedder used for the whole field (built-in lexical by default, or your configured OpenAI-compatible endpoint).</li>
+ <li><strong>Storage.</strong> The pooled whole-document vector stays in <code class="inline">&lt;field&gt;_vector</code> for back-compat and plain kNN; the per-passage vectors are persisted in <code class="inline">&lt;field&gt;_vector_chunks</code> <strong>only</strong> when the document spans more than one passage.</li>
+ <li><strong>Scoring.</strong> A <code class="inline">semantic</code> query scores each candidate by the maximum similarity over its passage vectors, falling back to the single pooled vector for short documents.</li>
+ </ul>
+
+ <h2>Notes and limits</h2>
+ <ul>
+ <li><strong>Short fields are byte-identical to before.</strong> A single-passage value stores one vector and scores exactly as it did pre-pipeline; no existing behavior changes.</li>
+ <li><strong>The built-in embedder is lexical</strong>, not neural — great for offline demos and CI. Point XERJ at an OpenAI-compatible <code class="inline">/v1/embeddings</code> endpoint (<code class="inline">[embedding]</code> in <code class="inline">xerj.toml</code>) for production semantics; the pipeline is identical, just higher-quality per-passage vectors.</li>
+ <li><strong>Scoring is exact (brute-force max-sim)</strong> over the passage vectors, which is what makes the ranking deterministic on the corpus sizes these recipes use.</li>
+ </ul>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipe · Passage retrieval</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/semantic-search-rag.html b/landing/docs/recipes/semantic-search-rag.html
new file mode 100644
index 000000000..e87fc30ea
--- /dev/null
+++ b/landing/docs/recipes/semantic-search-rag.html
@@ -0,0 +1,370 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Semantic search &amp; RAG</title>
+<meta name="description" content="Semantic search and RAG retrieval with XERJ — map a field as semantic_text, auto-embed on ingest, and retrieve passages by meaning with the semantic query, no separate vector database.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class="active"><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>SEMANTIC SEARCH &amp; RAG
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 01</span></div>
+ <h1>Semantic search &amp; RAG</h1>
+
+
+ <p><strong>Goal:</strong> you have a knowledge base (support docs, product FAQs, policy pages) and you want an LLM to answer questions <em>grounded</em> in it. The retrieval half of RAG — "find the passages that mean the same thing as the user's question" — normally means standing up a separate vector database, an embedding service, and glue code to keep them in sync with your search index.</p>
+
+ <p>With XERJ you don't. You map one field as <code class="inline">semantic_text</code>, ingest your docs with a normal <code class="inline">_bulk</code>, and XERJ <strong>embeds each document on ingest</strong> with a built-in, zero-config embedder. Then a <code class="inline">semantic</code> query retrieves by meaning from the same index you already full-text search. One engine, one wire protocol (Elasticsearch 8.x), no extra moving parts.</p>
+
+ <p>This recipe indexes a tiny KB, retrieves passages with paraphrased questions (different words, same meaning), assembles the context bundle you'd hand an LLM, and is honest about where the built-in lexical embedder stops and a real neural endpoint takes over.</p>
+
+ <hr>
+
+ <h2>1. Map one field as <code class="inline">semantic_text</code></h2>
+<pre class="code">curl -X PUT localhost:9200/kb -H 'Content-Type: application/json' -d '{
+ "mappings": {
+ "properties": {
+ "title": { "type": "text" },
+ "body": { "type": "semantic_text" }
+ }
+ }
+}'</pre>
+
+ <p><code class="inline">body</code> is now auto-embedded. On ingest XERJ vectorizes the field's text into a companion HNSW-indexed vector field (<code class="inline">body_vector</code>, 384 dims by default, cosine similarity) — you never call an embedding API yourself. No <code class="inline">dense_vector</code> declaration, no dimension bookkeeping, no second datastore.</p>
+
+ <h2>2. Ingest with a plain <code class="inline">_bulk</code></h2>
+ <p>Nothing special — the embedding happens under the hood:</p>
+<pre class="code">curl -X POST localhost:9200/_bulk -H 'Content-Type: application/x-ndjson' --data-binary '
+{"index":{"_index":"kb","_id":"kb-1"}}
+{"title":"Rotating an API key","body":"To change your API credentials, open Settings, choose Security, and click Regenerate token. The old token stops working immediately."}
+{"index":{"_index":"kb","_id":"kb-2"}}
+{"title":"Refund policy","body":"Customers can request their money back within 30 days of purchase. Refunds are issued to the original payment method within five business days."}
+'</pre>
+
+ <h2>3. Retrieve by meaning with the <code class="inline">semantic</code> query</h2>
+ <p>The user's question rarely uses your doc's exact words. A <code class="inline">match</code> query on <code class="inline">"get my money back after buying"</code> returns <strong>nothing</strong> — none of those tokens are in the "Refund policy" doc analyzed the same way. The <code class="inline">semantic</code> query retrieves it anyway:</p>
+<pre class="code">curl localhost:9200/kb/_search -H 'Content-Type: application/json' -d '{
+ "size": 2,
+ "query": { "semantic": { "field": "body", "query": "how do I regenerate my API token", "k": 2 } }
+}'</pre>
+
+ <p>Real response (trimmed):</p>
+<pre class="code">{
+ "hits": {
+ "hits": [
+ {
+ "_id": "kb-1",
+ "_score": 0.6625697,
+ "_source": {
+ "title": "Rotating an API key",
+ "body": "To change your API credentials, open Settings, choose Security, and click Regenerate token. The old token stops working immediately.",
+ "body_vector": [ 0.0, 0.0, 0.0, ... ]
+ }
+ }
+ ]
+ }
+}</pre>
+
+ <p><code class="inline">field</code> is the <code class="inline">semantic_text</code> field, <code class="inline">query</code> is the natural-language question, <code class="inline">k</code> is how many nearest passages to pull from the vector index. Add a <code class="inline">filter</code> (any XERJ query) to constrain candidates, or a <code class="inline">boost</code> to weight it inside a <code class="inline">bool</code>.</p>
+
+ <blockquote>
+ <p><strong><code class="inline">_source</code> note.</strong> The companion <code class="inline">body_vector</code> rides along in <code class="inline">_source</code> on semantic hits (source filtering is applied on the lexical path but the vector field is re-attached on the retrieval path). It's just noise for RAG — read the fields you want (<code class="inline">title</code>, <code class="inline">body</code>) and ignore it when you build the LLM prompt.</p>
+ </blockquote>
+
+ <h2>4. The RAG context bundle</h2>
+ <p>Retrieval done, RAG is just "concatenate the top passages into the prompt." Pull <code class="inline">k</code> hits and format them with their ids so the model can cite them:</p>
+<pre class="code">User question: how do I regenerate my API token
+
+Retrieved context:
+[kb-1] Rotating an API key
+To change your API credentials, open Settings, choose Security, and click
+Regenerate token. The old token stops working immediately.
+
+[kb-5] Rate limits
+The API permits 600 requests per minute per key. Exceeding the throttle returns
+HTTP 429; back off and retry after the reset window.</pre>
+
+ <p>Feed that block to your LLM as grounding context alongside the question. That's the whole retrieval side of RAG — no vector DB in the diagram.</p>
+
+ <h2>5. Results — paraphrases land on the right doc</h2>
+ <p>Running five paraphrased questions (none share the doc's full wording) against the 5-doc KB, each returns the correct passage at rank 1:</p>
+<pre class="code">Q: 'how do I regenerate my API token' -&gt; kb-1 Rotating an API key OK
+Q: 'can I get my money back after buying' -&gt; kb-2 Refund policy OK
+Q: "I forgot my login and can't sign in" -&gt; kb-3 Resetting a forgotten password OK
+Q: 'which file formats are supported for uploads' -&gt; kb-4 Supported file formats OK
+Q: 'how many calls per minute am I allowed' -&gt; kb-5 Rate limits OK
+
+RESULT: 5/5 semantic retrievals returned the right doc at rank 1</pre>
+
+ <p>For contrast, the same paraphrase through a keyword <code class="inline">match</code>:</p>
+<pre class="code">Q: 'get my money back after buying'
+ match top -&gt; NO HITS
+ semantic top -&gt; kb-2 Refund policy</pre>
+
+ <h2>Honest limitation: the built-in embedder is <em>lexical</em>, not neural</h2>
+ <p>The zero-config embedder is a <strong>lexical</strong> model — it maps overlapping and related vocabulary into vector space. It shines when the question and the answer share <em>some</em> terms (a synonym here, a rephrase there), which covers a lot of real support/FAQ traffic. It is <strong>not</strong> a neural sentence embedder and won't capture deep semantics with no lexical bridge.</p>
+
+ <p>Concretely, from this same KB:</p>
+<pre class="code">Q: 'how do I rotate my API key'
+ semantic top -&gt; kb-5 Rate limits (expected kb-1)</pre>
+
+ <p>The doc is <em>titled</em> "Rotating an API key," but only its <strong>body</strong> is embedded, and the body never uses the word "rotate" — so a pure "rotate" paraphrase misses. Two honest takeaways:</p>
+ <ul>
+ <li><strong>Embed the text that carries the meaning.</strong> If titles matter, index them into the <code class="inline">semantic_text</code> field too (or add a second <code class="inline">semantic_text</code> field and combine with <code class="inline">hybrid</code>), so the vocabulary the user might use is actually in the vector.</li>
+ <li><strong>For production-grade semantics, wire an external embeddings endpoint.</strong> XERJ will call any OpenAI-compatible <code class="inline">/v1/embeddings</code> service. Set <code class="inline">embedding.default_endpoint</code> in config, or point a field at it in the mapping via <code class="inline">inference_endpoint</code> / <code class="inline">inference_id</code>. The <code class="inline">semantic</code> query and the ingest path are identical — you just get neural-quality vectors instead of the built-in lexical ones. (Anomaly-style continuous re-embedding isn't a thing here; embedding happens at ingest time.)</li>
+ </ul>
+
+ <p>Everything above is <code class="inline">semantic_text</code> + the built-in embedder — no external service was configured for this recipe.</p>
+
+ <hr>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Start XERJ on its default port (<code class="inline">9200</code>) and run the example — no keys, no external services, stdlib Python only:</p>
+<pre class="code"># 1. Start a throwaway XERJ (ES-compat wire on :9200 by default)
+xerj --insecure --data-dir ./data
+
+# 2. In another shell, run the demo (honors $XERJ_URL, default http://localhost:9200)
+python3 docs/examples/semantic-search-rag/rag_demo.py</pre>
+
+ <p>Point it at a non-default host/port with <code class="inline">XERJ_URL=http://host:port</code> (the older <code class="inline">BASE</code> variable still works as an alias). The <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/semantic-search-rag/rag_demo.py">script</a> (stdlib only — <code class="inline">urllib</code> + <code class="inline">json</code>, no pip) creates the index, bulk-loads the KB, runs the five semantic retrievals with assertions, prints the RAG context bundle, shows the keyword-vs-semantic contrast, demonstrates the lexical-embedder miss, scores the ranking with <code class="inline">_rank_eval</code>, and exits non-zero if any of the five retrievals regress — so it doubles as a CI gate.</p>
+
+ <p>The built-in embedder is deterministic (offline lexical model), so every run prints the same numbers:</p>
+<pre class="code">bulk -&gt; errors=False items=5
+...
+Q: 'how do I regenerate my API token' top -&gt; kb-1 'Rotating an API key' score=0.6626 OK
+Q: 'can I get my money back after buying' top -&gt; kb-2 'Refund policy' score=0.5771 OK
+Q: "I forgot my login and can't sign in" top -&gt; kb-3 'Resetting a forgotten password' score=0.6710 OK
+Q: 'which file formats are supported for uploads' top -&gt; kb-4 'Supported file formats for upload' score=0.5926 OK
+Q: 'how many calls per minute am I allowed' top -&gt; kb-5 'Rate limits' score=0.6171 OK
+
+RESULT: 5/5 semantic retrievals returned the right doc at rank 1</pre>
+
+ <p>Every score above is emitted by this run (the top <code class="inline">kb-1</code> score is <code class="inline">0.6625697016716003</code>, shown to 4 dp); nothing is hardcoded. Point <code class="inline">XERJ_URL</code> at real Elasticsearch with a <code class="inline">semantic_text</code>/inference setup to compare.</p>
+
+ <hr>
+
+ <h2>Measuring ranking quality with <code class="inline">_rank_eval</code></h2>
+ <p>Once you have relevance judgements (which docs <em>should</em> come back for a query), the <code class="inline">_rank_eval</code> API scores your ranking with the standard IR metrics — the same wire API as Elasticsearch. XERJ computes each metric for real (they are <strong>not</strong> aliases for precision): <code class="inline">precision</code>, <code class="inline">recall</code>, <code class="inline">dcg</code> (add <code class="inline">"normalize": true</code> for nDCG), <code class="inline">mean_reciprocal_rank</code>, and <code class="inline">expected_reciprocal_rank</code>. An unknown metric name returns <code class="inline">400</code> rather than a misleading number.</p>
+ <p>Scoring the regenerate-token ranking against this KB — <code class="inline">kb-1</code> is the one relevant answer, so with it at rank 1 the ranking is perfect:</p>
+<pre class="code">curl -sX POST localhost:9200/kb/_rank_eval -H 'content-type: application/json' -d '{
+ "metric": { "dcg": { "k": 3, "normalize": true } },
+ "requests": [
+ {
+ "id": "regen_token_q",
+ "request": { "query": { "semantic": { "field": "body",
+ "query": "how do I regenerate my API token", "k": 3 } } },
+ "ratings": [
+ { "_id": "kb-1", "rating": 3 },
+ { "_id": "kb-5", "rating": 0 },
+ { "_id": "kb-2", "rating": 0 }
+ ]
+ }
+ ]
+}'
+# → { "metric_score": 1.0, "details": { "regen_token_q": { "metric_score": 1.0, ... } } }</pre>
+
+ <p>Swap <code class="inline">"dcg"</code> for <code class="inline">"precision"</code>, <code class="inline">"recall"</code>, or <code class="inline">"mean_reciprocal_rank"</code> to score the <em>same</em> ranking a different way — each returns its own value. These are the figures the demo actually measures against this KB:</p>
+<pre class="code">dcg (nDCG@3) metric_score=1.0
+precision@3 metric_score=0.3333333333333333
+recall@3 metric_score=1.0
+mean_reciprocal_rank metric_score=1.0
+unknown-metric -&gt; HTTP 400 (fail-loud, not a misleading number)</pre>
+
+ <p>Track whichever metric your product cares about as you tune embeddings, <code class="inline">k</code>, and hybrid weights.</p>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipe · Semantic search &amp; RAG</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/vector-quantization.html b/landing/docs/recipes/vector-quantization.html
new file mode 100644
index 000000000..097ccbf56
--- /dev/null
+++ b/landing/docs/recipes/vector-quantization.html
@@ -0,0 +1,283 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Vector quantization</title>
+<meta name="description" content="Opt a dense_vector field into scalar8 (int8) quantization for a 4× smaller vector working set at recall@10 ≈ 0.99 — same ranking, with the original vectors still returned in _source.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class="active"><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>VECTOR QUANTIZATION
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 05</span></div>
+ <h1>Vector quantization</h1>
+
+
+ <h2>The problem</h2>
+ <p>Dense vectors are heavy. A 768-dim <code class="inline">float32</code> embedding is ~3 KB; a million of them is ~3 GB of vector data that has to be resident to serve low-latency kNN. Scale to tens of millions and the vector working set — not the text, not the postings — becomes the thing that decides how much RAM you rent.</p>
+
+ <p>The standard fix is <strong>scalar quantization</strong>: store each dimension in one byte instead of four. That's a 4× reduction. The catch everyone worries about is recall — does compressing the vectors quietly wreck ranking quality?</p>
+
+ <h2>Why XERJ</h2>
+ <p>XERJ lets you opt a <code class="inline">dense_vector</code> field into <strong>scalar8</strong> (int8) quantization per field. When you do, the kNN <em>serving</em> path scores against 1-byte-per-dimension codes instead of 4-byte floats — a ~4× smaller vector working set — while <code class="inline">_source</code> still returns the <strong>original</strong> vectors for retrieval. It's off by default (full float32), so you choose precision vs. memory per field, exactly like Elasticsearch's <code class="inline">int8_hnsw</code>.</p>
+
+ <p>On a real 128-dim corpus the recall cost is negligible: <strong>recall@10 = 0.998</strong> against the exact float32 index, with the vector footprint cut from 512 to 128 bytes per vector — a <strong>measured 4.00× reduction</strong>. (Both numbers are computed by the run below, not stipulated.)</p>
+
+ <h2>The solution</h2>
+ <p>Opt a field in at mapping time with <code class="inline">index_options.type: int8_hnsw</code>:</p>
+<pre class="code">curl -sX PUT "$XERJ_URL/docs" -H 'content-type: application/json' -d '{
+ "mappings": {
+ "properties": {
+ "title": { "type": "text" },
+ "v": {
+ "type": "dense_vector",
+ "dims": 128,
+ "similarity": "cosine",
+ "index_options": { "type": "int8_hnsw" }
+ }
+ }
+ }
+}'</pre>
+
+ <p>Index and query exactly as you would a full-precision field — nothing else changes:</p>
+<pre class="code">curl -sX POST "$XERJ_URL/docs/_search" -H 'content-type: application/json' -d '{
+ "knn": { "field": "v", "query_vector": [0.12, 0.08, -0.31, "..."], "k": 10 }
+}'</pre>
+
+ <p>The scores come back slightly different from an exact float32 index (that's the quantization at work — a query that exactly matches a stored vector scores ~0.99999 instead of 1.0), but the <strong>ranking is the same</strong>.</p>
+
+ <h2>Try it</h2>
+ <p><a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/vector-quantization/quant_demo.py"><code class="inline">docs/examples/vector-quantization/quant_demo.py</code></a> (the mirrored <code class="inline">recipes/vector_quantization.py</code> runs the same demo) embeds the 40 real KB articles into 128-dim vectors, indexes the same vectors into a float32 index and a scalar8 index, and prints the side-by-side top hits, the measured recall@10, and the measured byte footprint of each encoding:</p>
+<pre class="code">$ python3 docs/examples/vector-quantization/quant_demo.py
+embedded 40 real KB articles into 128-dim vectors
+
+indexed into `vq-none` (float32) and `vq-scalar8` (int8_hnsw / scalar8)
+
+query: 'how do I stop an agent's context window from overflowing?'
+
+── float32 (exact)
+ 0.67958 Long-context windows do not replace memory
+ 0.60029 p95 latency budgets for interactive RAG agents
+ 0.59712 SOC 2 controls that apply to vector workloads
+
+── scalar8 (quantized)
+ 0.67938 Long-context windows do not replace memory
+ 0.60021 p95 latency budgets for interactive RAG agents
+ 0.59731 SOC 2 controls that apply to vector workloads
+
+recall@10 (scalar8 vs float32 ground truth): 0.998
+vector footprint over 40 vecs: float32 = 20480 B (512 B/vec) → scalar8 = 5120 B (128 B/vec) (4.00x smaller)
+
+OK — 4x smaller vectors, recall preserved. `_source` still holds the originals.</pre>
+
+ <p>The footprint line is a real measurement: the run encodes every corpus vector as float32 bytes (<code class="inline">struct</code>) and as int8 codes and compares the actual byte totals — 20480 B vs 5120 B, exactly 4.00×.</p>
+
+ <h2>Reproduce it yourself</h2>
+<pre class="code"># 1. Start XERJ (dev mode, default ES-compat port 9200)
+xerj --insecure --data-dir ./data &amp;
+
+# 2. Run the demo (stdlib-only Python 3, no packages, no API keys)
+python3 docs/examples/vector-quantization/quant_demo.py</pre>
+ <p><code class="inline">XERJ_URL</code> overrides the server (default <code class="inline">http://localhost:9200</code>); <code class="inline">XERJ_KB</code> overrides the KB path (default: auto-discovered <code class="inline">demo/data/ai_kb.ndjson</code>). The embedder and corpus are deterministic, so a customer should see exactly:</p>
+ <ul>
+ <li><code class="inline">recall@10 (scalar8 vs float32 ground truth): 0.998</code></li>
+ <li><code class="inline">vector footprint over 40 vecs: float32 = 20480 B (512 B/vec) → scalar8 = 5120 B (128 B/vec) (4.00x smaller)</code></li>
+ </ul>
+ <p>These numbers are stable run-to-run (verified across repeated runs — no variance); the printed kNN scores are likewise identical each run.</p>
+
+ <h2>Notes and limits</h2>
+ <ul>
+ <li><strong>Opt-in per field.</strong> Fields without <code class="inline">int8_hnsw</code> keep exact float32 scoring, byte-for-byte unchanged.</li>
+ <li><strong><code class="inline">_source</code> is never quantized.</strong> Retrieval returns the vectors you indexed; only the scoring path uses the compact codes.</li>
+ <li><strong><code class="inline">scalar8</code> is wired; <code class="inline">binary</code> is not yet.</strong> Binary (1-bit) quantization is rejected at startup rather than silently storing full precision.</li>
+ <li><strong>Cosine is normalised</strong> before quantizing for the tightest code range; <code class="inline">dot_product</code> and <code class="inline">l2_norm</code> similarities are supported too.</li>
+ </ul>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/recipes/vector-search-knn.html b/landing/docs/recipes/vector-search-knn.html
new file mode 100644
index 000000000..66af5373f
--- /dev/null
+++ b/landing/docs/recipes/vector-search-knn.html
@@ -0,0 +1,349 @@
+<!DOCTYPE html>
+<html lang="en" data-theme="night">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>XERJ · Docs · Recipe · Vector search · kNN</title>
+<meta name="description" content="Recipe · Vector similarity search with kNN in XERJ — store dense_vector fields, build an HNSW graph, run Elasticsearch-8 knn queries, and pre-filter with bool + filter.">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%230b0b0d'/><text x='50' y='68' font-size='60' font-family='Big Shoulders Display,sans-serif' font-weight='900' fill='%23ffc400' text-anchor='middle'>X</text></svg>">
+<link rel="stylesheet" href="/style.css?v=90f643e">
+</head>
+<body>
+
+
+<nav class="nav" aria-label="Primary">
+ <a href="/index.html" class="brand">XERJ.AI</a>
+ <a href="/index.html">HOME</a>
+ <a href="/product.html">PRODUCT</a>
+ <span class="nav-drop">
+ <a href="/use-cases.html">USE CASES</a>
+ </span>
+ <span class="spacer"></span>
+ <a href="/docs/index.html" class="active">DOCS</a>
+ <a href="/playground.html">DASHBOARDS</a>
+ <a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a>
+ <span class="spacer"></span>
+ <span class="theme">
+ <button type="button" data-theme="day">DAY</button>
+ <span class="dash">·</span>
+ <button type="button" data-theme="night" class="active">NIGHT</button>
+ </span>
+</nav>
+
+<div class="docs-search" id="docsSearch">
+ <input type="text" id="docsSearchInput" placeholder="Search docs · keys, flags, endpoints, playbooks…" aria-label="Search docs" autocomplete="off" spellcheck="false">
+ <span class="hint">⌘ K</span>
+ <div class="results" id="docsSearchResults" aria-live="polite"></div>
+</div>
+
+<div class="docs-shell">
+<nav class="docs-nav" aria-label="Docs"> <div class="group">
+ <span class="label">START</span>
+ <a href="/docs/index.html" class=""><span class="eyebrow">01</span>Overview</a>
+ <a href="/docs/quickstart.html" class=""><span class="eyebrow">02</span>Quickstart</a>
+ <a href="/docs/install.html" class=""><span class="eyebrow">03</span>Install</a>
+ <a href="/docs/migration-from-es.html" class=""><span class="eyebrow">04</span>Migrate from ES</a>
+ </div>
+ <div class="group">
+ <span class="label">REFERENCE</span>
+ <a href="/docs/cli.html" class=""><span class="eyebrow">01</span>CLI</a>
+ <a href="/docs/config.html" class=""><span class="eyebrow">02</span>Config TOML</a>
+ <a href="/docs/env.html" class=""><span class="eyebrow">03</span>Environment</a>
+ <a href="/docs/api-native.html" class=""><span class="eyebrow">04</span>Native REST API</a>
+ <a href="/docs/api-es-compat.html" class=""><span class="eyebrow">05</span>ES-compat API</a>
+ </div>
+ <div class="group">
+ <span class="label">DATA MODEL</span>
+ <a href="/docs/queries.html" class=""><span class="eyebrow">01</span>Query types</a>
+ <a href="/docs/aggregations.html" class=""><span class="eyebrow">02</span>Aggregations</a>
+ <a href="/docs/analyzers.html" class=""><span class="eyebrow">03</span>Analyzers</a>
+ <a href="/docs/vectors.html" class=""><span class="eyebrow">04</span>Vectors & HNSW</a>
+ </div>
+ <div class="group">
+ <span class="label">ENGINE</span>
+ <a href="/docs/ingest.html" class=""><span class="eyebrow">01</span>Ingest pipelines</a>
+ <a href="/docs/storage.html" class=""><span class="eyebrow">02</span>Storage & WAL</a>
+ <a href="/docs/compression.html" class=""><span class="eyebrow">03</span>Compression</a>
+ <a href="/docs/clustering.html" class=""><span class="eyebrow">04</span>Clustering</a>
+ <a href="/docs/metrics.html" class=""><span class="eyebrow">05</span>Metrics</a>
+ <a href="/docs/security.html" class=""><span class="eyebrow">06</span>Auth & TLS</a>
+ </div>
+ <div class="group">
+ <span class="label">OPERATIONS</span>
+ <a href="/docs/operations.html" class=""><span class="eyebrow">01</span>Running in production</a>
+ <a href="/docs/backup-restore.html" class=""><span class="eyebrow">02</span>Backup & restore</a>
+ <a href="/docs/upgrades.html" class=""><span class="eyebrow">03</span>Upgrades</a>
+ <a href="/docs/troubleshooting.html" class=""><span class="eyebrow">04</span>Troubleshooting</a>
+ </div>
+ <div class="group">
+ <span class="label">PLAYBOOKS</span>
+ <a href="/docs/playbooks/siem.html" class=""><span class="eyebrow">01</span>SIEM</a>
+ <a href="/docs/playbooks/log-analytics.html" class=""><span class="eyebrow">02</span>Log analytics</a>
+ <a href="/docs/playbooks/vector-search.html" class=""><span class="eyebrow">03</span>Vector · RAG</a>
+ <a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
+ <a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
+ </div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class="active"><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
+</nav>
+
+<main class="docs-content">
+ <!-- Print-only branded header (hidden on screen, visible in PDF) -->
+ <div class="print-header" style="display:none;">XERJ.AI</div>
+
+ <div class="breadcrumb"><a href="/docs/index.html">DOCS</a><span class="sep">·</span><a href="/docs/recipes/index.html">RECIPES</a><span class="sep">·</span>VECTOR SEARCH · KNN
+ <button class="pdf-btn" onclick="window.print()" title="Save this page as PDF">
+ <svg viewBox="0 0 24 24"><path d="M12 3v12M12 15l-4-4M12 15l4-4"/><path d="M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2"/></svg>
+ PDF
+ </button>
+ </div>
+ <div class="kicker"><span>RECIPE · 04</span></div>
+ <h1>Vector search · kNN</h1>
+
+
+ <p><strong>Goal:</strong> you have a set of items — products, articles, images, support tickets — and each one is represented by an <em>embedding</em>: a fixed-length list of floats. You want the classic operation behind recommendations, "more like this", dedup, and semantic retrieval: <strong>given one vector, find the N most similar items.</strong></p>
+
+ <p>XERJ answers this natively. It stores a <code class="inline">dense_vector</code> field, builds an HNSW graph over the vectors, and serves the Elasticsearch-8 top-level <code class="inline">knn</code> query — so the exact same request bodies (and ES client libraries) work unchanged. No sidecar vector database, no separate service.</p>
+
+ <p>This recipe uses <strong>tiny, hand-made 4-dimensional vectors</strong> so every result is reproducible and you can see <em>why</em> each neighbor came back. In production your vectors come from a real embedding model (768, 1024, 1536 dims…) — the API is identical.</p>
+
+ <h2>The toy feature space</h2>
+ <p>Real embeddings are opaque. To make kNN legible, we hand-build vectors in a 4-axis "feature space":</p>
+<pre class="code">[ citrus , berry , engine , wheels ]</pre>
+ <p>Fruits load on the fruit axes and are ~0 on the vehicle axes; vehicles do the reverse. So a query sitting in the <em>citrus</em> corner should return oranges and lemons first and <strong>never</strong> a truck. That's our recall check.</p>
+
+ <table>
+ <thead>
+ <tr><th>id</th><th>name</th><th>category</th><th>in_stock</th><th>embedding</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>1</td><td>Navel Orange</td><td>fruit</td><td>true</td><td><code class="inline">[0.90, 0.10, 0.00, 0.00]</code></td></tr>
+ <tr><td>2</td><td>Meyer Lemon</td><td>fruit</td><td>true</td><td><code class="inline">[0.95, 0.05, 0.00, 0.00]</code></td></tr>
+ <tr><td>3</td><td>Blood Orange</td><td>fruit</td><td><strong>false</strong></td><td><code class="inline">[0.85, 0.20, 0.00, 0.00]</code></td></tr>
+ <tr><td>4</td><td>Strawberry</td><td>fruit</td><td>true</td><td><code class="inline">[0.10, 0.92, 0.00, 0.00]</code></td></tr>
+ <tr><td>5</td><td>Blueberry</td><td>fruit</td><td>true</td><td><code class="inline">[0.05, 0.95, 0.00, 0.00]</code></td></tr>
+ <tr><td>6</td><td>Pickup Truck</td><td>vehicle</td><td>true</td><td><code class="inline">[0.00, 0.00, 0.90, 0.85]</code></td></tr>
+ <tr><td>7</td><td>Sports Car</td><td>vehicle</td><td>false</td><td><code class="inline">[0.00, 0.00, 0.95, 0.80]</code></td></tr>
+ <tr><td>8</td><td>Electric Sedan</td><td>vehicle</td><td>true</td><td><code class="inline">[0.00, 0.05, 0.40, 0.88]</code></td></tr>
+ </tbody>
+ </table>
+
+ <h2>1. Map a <code class="inline">dense_vector</code> field</h2>
+<pre class="code">curl -X PUT http://localhost:9200/catalog -H 'Content-Type: application/json' -d '{
+ "mappings": {
+ "properties": {
+ "name": { "type": "text" },
+ "category": { "type": "keyword" },
+ "in_stock": { "type": "boolean" },
+ "embedding": { "type": "dense_vector", "dims": 4, "similarity": "cosine" }
+ }
+ }
+}'</pre>
+ <p>Two things matter:</p>
+ <ul>
+ <li><strong><code class="inline">dims</code></strong> must equal the length of every vector you index. Indexing a wrong-length vector is silently skipped from the ANN scan.</li>
+ <li><strong><code class="inline">similarity</code></strong> defaults to <code class="inline">cosine</code> (magnitude-invariant — the right default for most normalized embeddings). Other options: <code class="inline">l2</code>, <code class="inline">dot_product</code>. Scores come back as ES-normalized cosine in <code class="inline">[0, 1]</code>: identical direction ≈ <code class="inline">1.0</code>, orthogonal ≈ <code class="inline">0.5</code>.</li>
+ </ul>
+ <p>Load the rows with the Bulk API (<code class="inline">{"index":{...}}</code> + source line pairs), adding <code class="inline">?refresh=true</code> so they're searchable immediately.</p>
+
+ <h2>2. Plain kNN — "find items most like a citrus fruit"</h2>
+ <p>Put the query vector right in the citrus corner and ask for the 3 nearest:</p>
+<pre class="code">curl -X POST http://localhost:9200/catalog/_search -H 'Content-Type: application/json' -d '{
+ "knn": { "field": "embedding", "query_vector": [0.92, 0.08, 0.0, 0.0], "k": 3, "num_candidates": 10 }
+}'</pre>
+ <p>Real response (trimmed):</p>
+<pre class="code">{
+ "hits": { "hits": [
+ { "_id": "1", "_score": 0.9998569, "_source": { "name": "Navel Orange", "category": "fruit" } },
+ { "_id": "2", "_score": 0.9997083, "_source": { "name": "Meyer Lemon", "category": "fruit" } },
+ { "_id": "3", "_score": 0.9948, "_source": { "name": "Blood Orange", "category": "fruit" } }
+ ] }
+}</pre>
+ <p>The three nearest are <strong>exactly</strong> the three citrus fruits, in order of closeness, and no vehicle leaked in. <code class="inline">k</code> is how many neighbors you want back; <code class="inline">num_candidates</code> is how many the graph search explores before picking the top <code class="inline">k</code> (bigger = higher recall, more work).</p>
+ <p>Query the <em>other</em> corner and the space cleanly separates:</p>
+<pre class="code">curl -X POST http://localhost:9200/catalog/_search -H 'Content-Type: application/json' -d '{
+ "knn": { "field": "embedding", "query_vector": [0.0, 0.0, 0.9, 0.85], "k": 2, "num_candidates": 10 }
+}'
+# → Pickup Truck (1.0), Sports Car (0.9992) — only vehicles</pre>
+
+ <h2>3. kNN + a filter — "…but only what's in stock"</h2>
+ <p>This is the request people actually get wrong. To constrain a kNN search (price range, in-stock, tenant, language…), <strong>wrap the <code class="inline">knn</code> in a <code class="inline">bool</code> and put the constraint in a sibling <code class="inline">filter</code> clause.</strong> <code class="inline">bool.filter</code> runs as a <strong>pre-filter</strong>: XERJ narrows the candidate set first, <em>then</em> ranks the survivors by similarity.</p>
+<pre class="code">curl -X POST http://localhost:9200/catalog/_search -H 'Content-Type: application/json' -d '{
+ "size": 3,
+ "query": {
+ "bool": {
+ "must": [ { "knn": { "field": "embedding", "query_vector": [0.92, 0.08, 0.0, 0.0], "k": 3, "num_candidates": 10 } } ],
+ "filter": [ { "term": { "in_stock": true } } ]
+ }
+ }
+}'</pre>
+ <p>Real response (trimmed):</p>
+<pre class="code">1 0.9999 Navel Orange in_stock=True
+2 0.9997 Meyer Lemon in_stock=True
+4 0.5969 Strawberry in_stock=True</pre>
+ <p>Blood Orange (id 3) is the 3rd-closest citrus but is <strong>out of stock</strong>, so it drops out and a farther <em>in-stock</em> item (a berry) takes the slot. The filter genuinely restricted the pool — it didn't just re-score.</p>
+ <blockquote>
+ <p><strong>Heads-up on the ES-8 shorthand.</strong> Elasticsearch also lets you inline the filter <em>inside</em> the knn clause: <code class="inline">"knn": { …, "filter": {…} }</code>. XERJ parses that form but <strong>currently ignores the inlined filter</strong> on the top-level-<code class="inline">knn</code> path (it returns unfiltered neighbors). Until that's wired up, use the <code class="inline">bool</code> + <code class="inline">filter</code> wrapper shown above — it's the reliable way to get pre-filtered kNN today, and it's also how XERJ's own agent-memory recall builds filtered vector queries internally.</p>
+ </blockquote>
+
+ <h2>Reproduce it yourself</h2>
+ <p>Boot XERJ on its default port and run the <a href="https://github.com/xerj-org/xerj/blob/main/docs/examples/vector-search-knn/knn_demo.py">self-checking script</a> — stdlib only, no pip, no network calls:</p>
+<pre class="code"># 1. start a throwaway node (default ES-compat port 9200)
+./engine/target/release/xerj --insecure --data-dir ./data
+
+# 2. in another shell, from the repo root:
+python3 docs/examples/vector-search-knn/knn_demo.py</pre>
+ <p>The script reads its server URL from <code class="inline">XERJ_URL</code> (default <code class="inline">http://localhost:9200</code>); the older <code class="inline">BASE</code> variable still works as an alias. Point it at any node with <code class="inline">XERJ_URL=http://host:port python3 …</code>.</p>
+ <p>It creates the index, bulk-loads the 8-row catalog, runs all three searches, and — beyond the pass/fail assertions — computes <strong>recall@k against a brute-force exact-cosine ground truth built in-process</strong>, so the "the result is exact" claim below is measured, not asserted. Exact tail from a real run:</p>
+<pre class="code">=== kNN k=3, query ~citrus ===
+ ('1', 0.9999, 'Navel Orange', 'fruit', True)
+ ('2', 0.9997, 'Meyer Lemon', 'fruit', True)
+ ('3', 0.9948, 'Blood Orange', 'fruit', False)
+ exact top-3 (brute-force cosine): ['1', '2', '3']
+ recall@3 = 1.000 (3/3 of the true nearest returned)
+ OK: top-3 are exactly the citrus fruits, no vehicles leaked in
+
+=== kNN + bool.filter in_stock:true ===
+ ('1', 0.9999, 'Navel Orange', 'fruit', True)
+ ('2', 0.9997, 'Meyer Lemon', 'fruit', True)
+ ('4', 0.5969, 'Strawberry', 'fruit', True)
+ OK: out-of-stock Blood Orange excluded; only in-stock neighbors returned
+
+=== kNN k=2, query ~vehicle ===
+ ('6', 1.0, 'Pickup Truck', 'vehicle', True)
+ ('7', 0.9992, 'Sports Car', 'vehicle', False)
+ exact top-2 (brute-force cosine): ['6', '7']
+ recall@2 = 1.000
+ OK: vehicle query returns only vehicles
+
+MEASURED recall vs brute-force exact across queries: 1.000 (exact)
+ALL ASSERTIONS PASSED</pre>
+ <p>The scores and recall are <strong>deterministic for this 8-row corpus</strong> — every run prints the same numbers (<code class="inline">recall@3 = recall@2 = 1.000</code>). The cosine scores above are the ES-normalized values <code class="inline">(1 + cos)/2</code>; unrounded they are <code class="inline">0.99985695</code>, <code class="inline">0.99970835</code>, <code class="inline">0.99479961</code> for the citrus top-3.</p>
+
+ <h2>How the search works: HNSW</h2>
+ <p>XERJ indexes vectors in an <strong>HNSW</strong> graph (Hierarchical Navigable Small World) — the same family of ANN index Elasticsearch/Lucene use. Instead of comparing your query against every stored vector (O(N), fine for our 8-row demo, painful at millions), HNSW builds a layered proximity graph and greedily hops toward the nearest region, giving roughly O(log N) search that stays fast as the corpus grows. XERJ builds with <code class="inline">ef_construction = 200</code> for high recall; at query time <code class="inline">num_candidates</code> controls the search-time breadth (the ANN analog of <code class="inline">ef_search</code>) — raise it to trade latency for recall, lower it for speed.</p>
+ <p>Because it's <em>approximate</em>, ANN can in principle miss a true neighbor. For a corpus this small the result is <strong>exact</strong> — the script above measures <strong>recall@k = 1.000</strong> against a brute-force cosine ground truth on every query, confirming HNSW returned the identical top-k. The knobs above only start to matter at scale.</p>
+
+ <h2>Raw kNN vs. <code class="inline">semantic_text</code>: which do I use?</h2>
+ <p>Both end up doing vector search. The difference is <strong>who makes the vectors.</strong></p>
+ <ul>
+ <li><strong>Raw <code class="inline">dense_vector</code> + <code class="inline">knn</code> (this recipe)</strong> — <em>you</em> supply the embeddings, on both the ingest side and the query side. Use it when you already run an embedding model (OpenAI, a local sentence-transformer, a CLIP image encoder, your own recommender) and just need fast storage and nearest-neighbor retrieval. Maximum control; works for any modality, not just text.</li>
+ <li><strong><code class="inline">semantic_text</code> field + <code class="inline">semantic</code> query</strong> — XERJ embeds text <strong>for</strong> you at ingest time and at query time, so you send plain strings and never touch a vector. Great when your data is text and you want semantic search with zero embedding plumbing. <em>Honest caveat:</em> the built-in embedder is <strong>lexical, not neural</strong> — excellent for demos and keyword-semantic overlap, but for production-grade semantic quality point XERJ at an external OpenAI-compatible <code class="inline">/v1/embeddings</code> endpoint (<code class="inline">embedding.default_endpoint</code>), after which both ingest and query use that higher-quality model.</li>
+ </ul>
+ <p>Rule of thumb: <strong>already have embeddings → raw <code class="inline">knn</code>. Have text and want it embedded for you → <code class="inline">semantic_text</code>.</strong> Need to blend keyword relevance (BM25) with vector similarity in one request? Reach for the <code class="inline">hybrid</code> query.</p>
+
+ <h2>Gotchas</h2>
+ <ul>
+ <li><strong><code class="inline">dims</code> must match your vectors exactly</strong> — a length mismatch means the doc is skipped from the scan, not an error.</li>
+ <li><strong>Filter a kNN with <code class="inline">bool</code> + <code class="inline">filter</code></strong>, not the inlined <code class="inline">knn.filter</code> (currently ignored on the top-level path — see §3).</li>
+ <li><strong><code class="inline">k</code> vs <code class="inline">num_candidates</code></strong>: <code class="inline">k</code> = results returned; <code class="inline">num_candidates</code> = how many the graph explores first. <code class="inline">num_candidates &gt;= k</code>; raise it if recall matters.</li>
+ <li>Scores are <strong>ES-normalized cosine in <code class="inline">[0,1]</code></strong> (≈1.0 identical, ≈0.5 orthogonal), not raw cosine in <code class="inline">[-1,1]</code>.</li>
+ </ul>
+
+ <!-- Print-only branded footer (hidden on screen, visible in PDF) -->
+ <div class="print-footer" style="display:none;">
+ <span>XERJ.AI · V0.1 · 2026-04-16</span>
+ <a href="https://xerj.dev/docs/">https://xerj.dev/docs/</a>
+ <span>Recipe · Vector search · kNN</span>
+ </div>
+</main>
+</div>
+
+<footer class="footer">
+ <span>XERJ.AI · DOCS · V1.0.0-RC.1</span>
+ <span>READ THE SOURCE</span>
+ <span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
+</footer>
+
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
+
+<script>
+ // IIFE — js-auth navigates between decrypted pages in the same
+ // JS realm, so const bindings must be lexically scoped.
+ (function () {
+ const root = document.documentElement;
+ for (const btn of document.querySelectorAll('[data-theme]')) {
+ btn.addEventListener('click', () => {
+ const t = btn.getAttribute('data-theme');
+ root.setAttribute('data-theme', t);
+ for (const b of document.querySelectorAll('[data-theme]')) {
+ b.classList.toggle('active', b.getAttribute('data-theme') === t);
+ }
+ });
+ }
+
+ // Client-side docs search — filters the inline JSON index.
+ const searchEl = document.getElementById('docsSearch');
+ const inputEl = document.getElementById('docsSearchInput');
+ const resultsEl = document.getElementById('docsSearchResults');
+ const indexJson = document.getElementById('docs-index');
+ if (searchEl && inputEl && resultsEl && indexJson) {
+ let index = [];
+ try { index = JSON.parse(indexJson.textContent || '[]'); } catch {}
+ const render = (q) => {
+ const query = q.trim().toLowerCase();
+ if (!query) { searchEl.classList.remove('active'); resultsEl.innerHTML = ''; return; }
+ const scored = [];
+ for (const e of index) {
+ const hay = (e.title + ' ' + (e.kicker || '') + ' ' + (e.snip || '')).toLowerCase();
+ if (hay.includes(query)) {
+ let score = 0;
+ if (e.title.toLowerCase().includes(query)) score += 10;
+ if ((e.kicker || '').toLowerCase() === query.toUpperCase()) score += 5;
+ if ((e.snip || '').toLowerCase().includes(query)) score += 1;
+ scored.push({ e, score });
+ }
+ }
+ scored.sort((a, b) => b.score - a.score);
+ const top = scored.slice(0, 20);
+ if (top.length === 0) {
+ resultsEl.innerHTML = '<div class="no-results">NO MATCHES — TRY A SHORTER QUERY</div>';
+ } else {
+ resultsEl.innerHTML = top.map(({e}) => {
+ const kicker = e.kicker || '';
+ const snip = e.snip ? '<div class="snip">' + escHtml(e.snip) + '</div>' : '';
+ return '<a href="' + e.slug + '">' +
+ '<span class="kicker">' + escHtml(kicker) + '</span>' +
+ '<span class="title">' + escHtml(e.title) + '</span>' +
+ snip + '</a>';
+ }).join('');
+ }
+ searchEl.classList.add('active');
+ };
+ const escHtml = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+ inputEl.addEventListener('input', (e) => render(e.target.value));
+ inputEl.addEventListener('focus', () => { if (inputEl.value) render(inputEl.value); });
+ document.addEventListener('keydown', (e) => {
+ if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ inputEl.focus();
+ inputEl.select();
+ }
+ if (e.key === 'Escape' && document.activeElement === inputEl) {
+ inputEl.value = '';
+ searchEl.classList.remove('active');
+ resultsEl.innerHTML = '';
+ inputEl.blur();
+ }
+ });
+ }
+ })();
+</script>
+
+</body>
+</html>
diff --git a/landing/docs/security.html b/landing/docs/security.html
index 627ce11f3..392a12844 100644
--- a/landing/docs/security.html
+++ b/landing/docs/security.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -149,7 +163,7 @@ key_path = "/etc/xerj/certs/xerj.key"</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/storage.html b/landing/docs/storage.html
index b374e6581..996a4ab44 100644
--- a/landing/docs/storage.html
+++ b/landing/docs/storage.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -170,7 +184,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/troubleshooting.html b/landing/docs/troubleshooting.html
index a5730eb4b..ae1adc3fa 100644
--- a/landing/docs/troubleshooting.html
+++ b/landing/docs/troubleshooting.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -181,7 +195,7 @@ contents:
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/upgrades.html b/landing/docs/upgrades.html
index 748288243..10c1f6029 100644
--- a/landing/docs/upgrades.html
+++ b/landing/docs/upgrades.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -178,7 +192,7 @@ $ sudo systemctl start xerj</pre>
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same
diff --git a/landing/docs/vectors.html b/landing/docs/vectors.html
index 2cc87ccba..493ad5091 100644
--- a/landing/docs/vectors.html
+++ b/landing/docs/vectors.html
@@ -86,6 +86,20 @@
<a href="/docs/playbooks/full-text.html" class=""><span class="eyebrow">04</span>Full-text search</a>
<a href="/docs/playbooks/observability.html" class=""><span class="eyebrow">05</span>Observability</a>
</div>
+ <div class="group">
+ <span class="label">RECIPES</span>
+ <a href="/docs/recipes/index.html" class=""><span class="eyebrow">00</span>All recipes</a>
+ <a href="/docs/recipes/semantic-search-rag.html" class=""><span class="eyebrow">01</span>Semantic search &amp; RAG</a>
+ <a href="/docs/recipes/agentic-memory.html" class=""><span class="eyebrow">02</span>Agent memory</a>
+ <a href="/docs/recipes/passage-retrieval.html" class=""><span class="eyebrow">03</span>Passage retrieval</a>
+ <a href="/docs/recipes/vector-search-knn.html" class=""><span class="eyebrow">04</span>Vector search &middot; kNN</a>
+ <a href="/docs/recipes/vector-quantization.html" class=""><span class="eyebrow">05</span>Vector quantization</a>
+ <a href="/docs/recipes/hybrid-search.html" class=""><span class="eyebrow">06</span>Hybrid search</a>
+ <a href="/docs/recipes/log-analytics.html" class=""><span class="eyebrow">07</span>Log analytics</a>
+ <a href="/docs/recipes/anomaly-detection.html" class=""><span class="eyebrow">08</span>Anomaly detection</a>
+ <a href="/docs/recipes/continuous-anomaly-datafeeds.html" class=""><span class="eyebrow">09</span>Anomaly datafeeds</a>
+ <a href="/docs/recipes/migrate-from-elasticsearch.html" class=""><span class="eyebrow">10</span>Migrate from ES</a>
+ </div>
</nav>
<main class="docs-content">
@@ -186,7 +200,7 @@
<span><a href="/index.html">HOME</a> · <a href="/product.html">PRODUCT</a> · <a href="/brand.html">BRAND</a> · <a href="/playground.html">DASHBOARDS</a></span>
</footer>
-<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."}]</script>
+<script type="application/json" id="docs-index">[{"title":"Overview","slug":"/docs/index.html","kicker":"START","snip":""},{"title":"Quickstart","slug":"/docs/quickstart.html","kicker":"START","snip":""},{"title":"Install","slug":"/docs/install.html","kicker":"START","snip":""},{"title":"Migrate from ES","slug":"/docs/migration-from-es.html","kicker":"START","snip":""},{"title":"CLI","slug":"/docs/cli.html","kicker":"REFERENCE","snip":""},{"title":"Config TOML","slug":"/docs/config.html","kicker":"REFERENCE","snip":""},{"title":"Environment","slug":"/docs/env.html","kicker":"REFERENCE","snip":""},{"title":"Native REST API","slug":"/docs/api-native.html","kicker":"REFERENCE","snip":""},{"title":"ES-compat API","slug":"/docs/api-es-compat.html","kicker":"REFERENCE","snip":""},{"title":"Query types","slug":"/docs/queries.html","kicker":"DATA MODEL","snip":""},{"title":"Aggregations","slug":"/docs/aggregations.html","kicker":"DATA MODEL","snip":""},{"title":"Analyzers","slug":"/docs/analyzers.html","kicker":"DATA MODEL","snip":""},{"title":"Vectors & HNSW","slug":"/docs/vectors.html","kicker":"DATA MODEL","snip":""},{"title":"Ingest pipelines","slug":"/docs/ingest.html","kicker":"ENGINE","snip":""},{"title":"Storage & WAL","slug":"/docs/storage.html","kicker":"ENGINE","snip":""},{"title":"Compression","slug":"/docs/compression.html","kicker":"ENGINE","snip":""},{"title":"Clustering","slug":"/docs/clustering.html","kicker":"ENGINE","snip":""},{"title":"Metrics","slug":"/docs/metrics.html","kicker":"ENGINE","snip":""},{"title":"Auth & TLS","slug":"/docs/security.html","kicker":"ENGINE","snip":""},{"title":"Running in production","slug":"/docs/operations.html","kicker":"OPERATIONS","snip":""},{"title":"Backup & restore","slug":"/docs/backup-restore.html","kicker":"OPERATIONS","snip":""},{"title":"Upgrades","slug":"/docs/upgrades.html","kicker":"OPERATIONS","snip":""},{"title":"Troubleshooting","slug":"/docs/troubleshooting.html","kicker":"OPERATIONS","snip":""},{"title":"SIEM","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOKS","snip":""},{"title":"Log analytics","slug":"/docs/playbooks/log-analytics.html","kicker":"PLAYBOOKS","snip":""},{"title":"Vector · RAG","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOKS","snip":""},{"title":"Full-text search","slug":"/docs/playbooks/full-text.html","kicker":"PLAYBOOKS","snip":""},{"title":"Observability","slug":"/docs/playbooks/observability.html","kicker":"PLAYBOOKS","snip":""},{"title":"CLI · --config","slug":"/docs/cli.html#config-flag","kicker":"CLI","snip":"-c, --config <PATH> Path to the TOML config file."},{"title":"CLI · --data-dir","slug":"/docs/cli.html#data-dir-flag","kicker":"CLI","snip":"-d, --data-dir <PATH> Override [server] data_dir at the command line."},{"title":"CLI · --insecure","slug":"/docs/cli.html#insecure-flag","kicker":"CLI","snip":"-k, --insecure Disable TLS and API-key auth. Dev only."},{"title":"[server] rest_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 8080 · Native REST API listener port."},{"title":"[server] es_compat_port","slug":"/docs/config.html#server","kicker":"CONFIG","snip":"u16 · default 9200 · Elasticsearch-wire-format port. 0 to disable."},{"title":"[storage] wal_sync","slug":"/docs/config.html#storage","kicker":"CONFIG","snip":"enum · default batched · sync · batched · async. Durability knob."},{"title":"[vector] hnsw_ef_search","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"u32 · default 100 · Beam width at query time. Per-query override."},{"title":"[vector] default_quantization","slug":"/docs/config.html#vector","kicker":"CONFIG","snip":"enum · none · scalar8 · scalar4 · binary."},{"title":"GET /v1/health","slug":"/docs/api-native.html#health","kicker":"NATIVE API","snip":"Liveness + readiness. {status, uptime_s, version}."},{"title":"GET /v1/metrics","slug":"/docs/api-native.html#metrics","kicker":"NATIVE API","snip":"Prometheus text format. Scrape-friendly."},{"title":"POST /v1/indices/:name/turbo-ingest","slug":"/docs/api-native.html#turbo-ingest","kicker":"NATIVE API","snip":"NDJSON bulk path with parallel tokenization."},{"title":"POST /v1/indices/:name/search","slug":"/docs/api-native.html#search","kicker":"NATIVE API","snip":"Unified query endpoint — full-text, term, range, KNN, hybrid."},{"title":"POST /:index/_bulk","slug":"/docs/api-es-compat.html#bulk","kicker":"ES API","snip":"NDJSON bulk. Actions: index, create, update, delete."},{"title":"POST /:index/_search","slug":"/docs/api-es-compat.html#search","kicker":"ES API","snip":"ES query DSL. Drop-in migration path."},{"title":"match_all","slug":"/docs/queries.html#match-all","kicker":"QUERY","snip":"Everything in the index."},{"title":"bool","slug":"/docs/queries.html#bool","kicker":"QUERY","snip":"must / should / must_not / filter clauses."},{"title":"knn","slug":"/docs/queries.html#knn","kicker":"QUERY","snip":"Vector kNN with per-query ef_search."},{"title":"semantic_search","slug":"/docs/queries.html#semantic-search","kicker":"QUERY","snip":"Embed the query at query time."},{"title":"hybrid","slug":"/docs/queries.html#hybrid","kicker":"QUERY","snip":"RRF / linear / learned fusion of sub-queries."},{"title":"terms aggregation","slug":"/docs/aggregations.html#terms","kicker":"AGG","snip":"Exact, pre-computed histogram. 74× faster on SIEM top-IP."},{"title":"date_histogram","slug":"/docs/aggregations.html#date-histogram","kicker":"AGG","snip":"Time-bucketed counts."},{"title":"HNSW","slug":"/docs/vectors.html#hnsw","kicker":"VECTORS","snip":"Hierarchical graph index. m, ef_construction, ef_search."},{"title":"SQ8 quantization","slug":"/docs/vectors.html#quantization","kicker":"VECTORS","snip":"8-bit scalar quantization. 4× memory reduction."},{"title":"turbo-ingest","slug":"/docs/ingest.html#turbo","kicker":"INGEST","snip":"NDJSON bulk path. Parallel tokenization across cores."},{"title":"delta-of-delta","slug":"/docs/compression.html#delta-of-delta","kicker":"COMPRESSION","snip":"Timestamp encoding. Apache/Nginx/ISO auto-detect."},{"title":"dictionary encoding","slug":"/docs/compression.html#dictionary","kicker":"COMPRESSION","snip":"Up to 256 unique strings per column."},{"title":"api_key","slug":"/docs/security.html#api-key","kicker":"SECURITY","snip":"Static admin key. Auto-generated on first run."},{"title":"SIEM playbook","slug":"/docs/playbooks/siem.html","kicker":"PLAYBOOK","snip":"Terms agg, top-source-IPs, 74× faster than ES. Detection rules."},{"title":"RAG playbook","slug":"/docs/playbooks/vector-search.html","kicker":"PLAYBOOK","snip":"Embeddings, HNSW, hybrid search, BM25 + kNN fusion."},{"title":"[cluster] enabled","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"bool · default false · Enable multi-node Raft cluster mode."},{"title":"[cluster] peers","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"array · \"node_id=host:port\" · At least one peer per node."},{"title":"[cluster] port","slug":"/docs/config.html#cluster","kicker":"CONFIG","snip":"u16 · default 9300 · Intra-cluster Raft + search port."},{"title":"[embedding] default_endpoint","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · OpenAI-compatible embeddings URL for auto-embedding on ingest."},{"title":"[embedding] default_model","slug":"/docs/config.html#embedding","kicker":"CONFIG","snip":"string · Model name (e.g. text-embedding-3-small, nomic-embed-text)."},{"title":"Raft","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Embedded Raft — leader election, log replication, metadata only."},{"title":"Node draining","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"POST /v1/cluster/nodes/:id/drain before maintenance."},{"title":"Region split/merge","slug":"/docs/clustering.html","kicker":"CLUSTER","snip":"Range partitions auto-split at byte threshold, merge back when small."},{"title":"Systemd unit","slug":"/docs/operations.html","kicker":"OPS","snip":"Production unit file with hardening directives."},{"title":"Readiness probe","slug":"/docs/operations.html","kicker":"OPS","snip":"GET /v1/health/ready — only 200 once WAL replay is complete."},{"title":"Config reload","slug":"/docs/operations.html","kicker":"OPS","snip":"SIGHUP reloads most keys without restart."},{"title":"Hot backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"rsync the data dir after POST /v1/admin/flush."},{"title":"S3 backup","slug":"/docs/backup-restore.html","kicker":"OPS","snip":"POST /v1/admin/backup → any S3-compatible endpoint."},{"title":"Rolling upgrade","slug":"/docs/upgrades.html","kicker":"OPS","snip":"Drain → stop → upgrade → start → activate, per node."},{"title":"Merge pressure","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Segment count climbing → raise merge.max_concurrent + io_rate."},{"title":"Cluster flapping","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"Leader changes every few seconds → raise cluster.tick_ms."},{"title":"WAL replay failed","slug":"/docs/troubleshooting.html","kicker":"OPS","snip":"xerj verify --repair-wal truncates at last valid entry."},{"title": "Recipes", "slug": "/docs/recipes/index.html", "kicker": "RECIPES", "snip": "Task-oriented AI & search recipes, each verified end-to-end against a live XERJ."},{"title": "Semantic search & RAG", "slug": "/docs/recipes/semantic-search-rag.html", "kicker": "RECIPE", "snip": "Retrieval by meaning with semantic_text — auto-embed on ingest, no separate vector DB."},{"title": "Agent memory", "slug": "/docs/recipes/agentic-memory.html", "kicker": "RECIPE", "snip": "Long-term memory for agents via /_memory — store, recall, forget, per-agent isolation."},{"title": "Passage retrieval", "slug": "/docs/recipes/passage-retrieval.html", "kicker": "RECIPE", "snip": "Auto-chunk long docs; best-passage (max-sim) scoring — 98% top-3."},{"title": "Vector search · kNN", "slug": "/docs/recipes/vector-search-knn.html", "kicker": "RECIPE", "snip": "Nearest-neighbor over dense_vector (HNSW) with filters."},{"title": "Vector quantization", "slug": "/docs/recipes/vector-quantization.html", "kicker": "RECIPE", "snip": "int8_hnsw scalar8 — 4× smaller vectors, recall@10 ≈ 0.99."},{"title": "Hybrid search", "slug": "/docs/recipes/hybrid-search.html", "kicker": "RECIPE", "snip": "Keyword + vector in one query — RRF fusion."},{"title": "Log analytics", "slug": "/docs/recipes/log-analytics.html", "kicker": "RECIPE", "snip": "Raw logs to dashboards — error rates, p95 latency, top services."},{"title": "Anomaly detection", "slug": "/docs/recipes/anomaly-detection.html", "kicker": "RECIPE", "snip": "Statistical _ml detectors that flag spikes in metrics/logs."},{"title": "Anomaly datafeeds", "slug": "/docs/recipes/continuous-anomaly-datafeeds.html", "kicker": "RECIPE", "snip": "Live _ml datafeed re-scores an index on a timer, stores anomaly records."},{"title": "Migrate from ES", "slug": "/docs/recipes/migrate-from-elasticsearch.html", "kicker": "RECIPE", "snip": "Point your existing ES client at XERJ — same wire, change the URL."}]</script>
<script>
// IIFE — js-auth navigates between decrypted pages in the same