quickwit-oss / quickwit-oss/quickwit

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

Open
#6,475 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
11.7k
Forks
597
Avg merge
2d 22h
Merged PRs (30d)
37

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the search API parses a bare field:* query and how that path uses the field-presence index when index_field_presence: false. Compare it with the working field:[* TO *] workaround, then establish which existence semantics and failure behavior should be covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, search
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.