Skip to content

Boolean fields missing from fieldTypeMap #180

@xrl

Description

@xrl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions