filter / filters bucket aggregations rejected on _elastic/_search and native search

Aperta
#6,473 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
elasticsearch, rust
Ambito
search

Direzione di ricerca

Riproduci la richiesta sia sulla native search API sia sull'endpoint ES-compat _elastic/_search, quindi traccia il punto di ingresso del parser delle aggregazioni per le aggregazioni di bucket. Implementa il supporto per filter e filters con sotto-aggregazioni e verifica che entrambe le forme applichino i propri predicati ai sottoinsiemi corretti di documenti, incluso l'esempio value_count fornito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:elasticsearch-api area:query

Summary

On 0.8.x, the filter (singular) and filters (plural) bucket aggregations appear to be rejected on both the native search API and the ES-compat _elastic/_search endpoint. This is the canonical Elasticsearch idiom for splitting one search into N sub-buckets, each with its own predicate, and we haven't found a workable equivalent using bool + terms.

Repro (ES-compat)

curl -sS -X POST "$QW/api/v1/_elastic/<index>/_search" \
  -H 'content-type: application/json' \
  -d '{
    "size": 0,
    "aggs": {
      "failed_logins": {
        "filter": { "term": { "event.outcome": "failure" } },
        "aggs": { "c": { "value_count": { "field": "@timestamp" } } }
      }
    }
  }'

Observed behavior

HTTP 400 — agg parser rejects the filter key. Same shape on filters. Reproduces regardless of the inner query (term, bool, query_string, match_all).

Expected behavior

Accept filter and filters with standard Elasticsearch semantics: bucket the matching docs, run sub-aggs only on that subset.

Use case

Stacked-series dashboards where multiple metrics share the same date_histogram axis but each has its own predicate (e.g. "failed logins per hour" alongside "successful logins per hour" on one chart). The only purely-Quickwit alternative is N round-trips, which doesn't compose for shared axes.

Version

Observed on 0.8.x. Have not verified against main — happy to retest if this is already fixed.

Lingua principale
Rust
Stelle
11.8k
Fork
628
Merge medio
2g 22h
PR unite (30g)
50

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quickwit-oss/quickwit

Tutte le issue di quickwit-oss/quickwit

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.