quickwit-oss / quickwit-oss/quickwit-datasource

Boolean fields missing from fieldTypeMap

Open Beginner friendly
#180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
76
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Problem

Quickwit's _field_caps endpoint reports boolean fields as type boolean, but the plugin's fieldTypeMap in src/utils/index.ts does not include a boolean entry. This means:

  1. Boolean fields get type: undefined when mapped through fieldTypeMap
  2. They are excluded from type-filtered field pickers (e.g. when the query editor requests "number" or "string" fields)
  3. They may not appear in autocomplete suggestions

Scope

In our OTEL log index, there are 157 boolean fields (dynamic JSON subfields). These are fields like attributes.attr.command.ignoreUnknownIndexOptions that have boolean values in the indexed JSON documents.

Fix

Add boolean to fieldTypeMap:

export const fieldTypeMap: Record<string, string> = {
  // ... existing entries ...
  boolean: 'boolean',
};

May also need to handle boolean in filter operator selection if Grafana passes boolean values as strings.

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 in src/utils/index.ts and inspect fieldTypeMap and the code that maps _field_caps types into field pickers. Add boolean handling and check whether filter operator selection receives boolean values as strings. Done means boolean fields have the expected type, appear in type-filtered pickers and autocomplete suggestions, and filter selection handles them correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.