Native REST API
Port 8080. Use it for anything new. The native surface has the explain plan, the turbo-ingest path, and the log-shaped endpoints the ES compat layer can't express cleanly.
{status, uptime_s, version}.Request body shape — /v1/indices/:name/search
{
"query": {
"bool": {
"must": [ { "match": { "message": "login failed" } } ],
"filter": [
{ "term": { "service": "auth" } },
{ "range": { "@timestamp": { "gte": "now-1h" } } }
]
}
},
"aggs": {
"by_host": { "terms": { "field": "host", "size": 10 } }
},
"size": 100,
"sort": [ { "@timestamp": "desc" } ]
}
Per-field score breakdown — "explain": true
Add "explain": true to a search body to see how much of each hit's _score came from each field. For every field the query scores on, the engine runs the query again with only that field's clauses, limited to the returned hits. Each number is the engine's own score for that field.
// should: [ match title "bone density" (boost 2), match body "vitamin" ]
"_score": 3.6435528,
"_score_breakdown": {
"fields": [ { "field": "title", "score": 3.1769588 }, { "field": "body", "score": 0.4665940 } ],
"combine": "sum",
"unattributed": 0.0
}
combine: "sum" means the query adds its field scores (bool, match, most_fields), so _score = the sum of fields + unattributed. combine: "other" means the scores combine another way: the max (best_fields, dis_max), a product (function_score), or one clause over all fields (a field-less query). In that case the per-field numbers do not add up to _score. Each scored field adds one search, up to 64 fields. The ES-compatible explain on _search and _explain are unchanged.
Source · engine/crates/xerj-api/src/native.rs · engine/crates/xerj-api/src/field_explain.rs · engine/crates/xerj-api/src/router.rs