field:* returns 0 hits when index built with index_field_presence: false

Aperta
#6,475 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
backend, search

Direzione di ricerca

Inizia tracciando il modo in cui la Search API analizza una query semplice field:* e il modo in cui quel percorso utilizza l’indice di presenza dei campi quando index_field_presence: false. Confrontala con il workaround funzionante field:[* TO *], quindi stabilisci quali semantiche di esistenza e quale comportamento in caso di errore dovrebbero essere coperti dai test.

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

Descrizione

area:doc-mapping area:query

Summary

A bare field:* is parsed as the field-presence query, which is backed by the field-presence index. When an index has index_field_presence: false in its doc-mapping, every field:* returns 0 hits regardless of whether the column contains data. The failure is silent — no error, no warning — and is a frequent foot-gun for callers who reasonably read field:* as "field exists."

Repro

# doc-mapping.yaml
index_field_presence: false
field_mappings:
  - name: vendor
    type: text
    tokenizer: raw_lowercase
# Index {"vendor": "aws"}, then:
curl -sS "$QW/api/v1/<index>/search?query=vendor:*"
# → hits: 0. The document and the value exist; the field-presence
#   index was never populated.

Expected behavior

At minimum one of:

  1. field:* transparently falls back to a column-index scan when index_field_presence: false.
  2. Quickwit emits a parse-time warning (or 400) when field:* is used against an index without field-presence enabled.
  3. A separate, discoverable query operator with "exists in column" semantics that does not depend on the field-presence index.

The range form field:[* TO *] empirically works as a workaround, but it isn't documented as an existence check and only works on a subset of field types.

Use case

Multi-tenant indexes where some tenants opt out of index_field_presence for write-throughput reasons. Today this means every exists-style query has to special-case the index config.

Version

Observed on 0.8.x.

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.