Boolean fields missing from fieldTypeMap

オープン 初心者向け
#180 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
frontend

調査の方向性

src/utils/index.ts から始めて、fieldTypeMap と _field_caps の型をフィールドピッカーにマッピングするコードを調べます。boolean の処理を追加し、フィルター演算子の選択が boolean 値を文字列として受け取るかどうかを確認します。boolean フィールドが期待される型になり、型でフィルターされたピッカーと autocomplete の候補に表示され、フィルター選択で正しく処理されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
76
フォーク
45
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quickwit-oss/quickwit-datasource のほかの issue

quickwit-oss/quickwit-datasource の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。