quickwit-oss / quickwit-datasource

Quickwit data source for Grafana
GNU Affero General Public License v3.0
43 stars 10 forks source link

Add dynamic fields in the list of available field in aggregation query editor #20

Closed fmassot closed 9 months ago

fmassot commented 1 year ago

When forging an aggregation query, we need to choose the fields to aggregate on. Currently, the list of proposed fields is limited to fields available in the index doc mapping. But, in the case of a dynamic mapping, this means that most of the fields can be missed. Instead of using the doc mapping to get the list of available fields, we should use the field capabilities endpoint of Quickwit when it will be added.

Endpoint to use: _elastic/{index-id}/_field_caps Docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html

idrissneumann commented 10 months ago

Image

idrissneumann commented 10 months ago
curl http://localhost:7280/api/v1/_elastic/otel-traces-v0_6/_field_caps
idrissneumann commented 10 months ago

PR's here: https://github.com/quickwit-oss/quickwit-datasource/pull/41