Showing query parameters in DSL query results

Let's take the DSL query example below. I'd like to see the value of fixed_interval in date_histogram in the generated response. Is it possible to tell in the DSL query to display this or any parameter value in the result response?

GET workflow*/_search
{
    "query": {
        "bool": {
          "must": [],
          "filter": [
            {
              "match_phrase": {
                "job_name.keyword": "fakejobname"
              }
            },
            {
              "range": {
                "@timestamp": {
                  "format": "strict_date_optional_time",
                  "gte": "2023-05-08T22:00:00.000Z",
                  "lte": "2023-05-16T21:30:00.000Z"
                }
              }
            }
          ],
          "should": [],
          "must_not": []
        }
    },
    "track_total_hits": true,
    "size": 0,
    "aggs": {
        "consumer_runtime_avg": {
              "avg": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "consumer_runtime_min": {
              "min": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "consumer_runtime_max": {
              "max": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "percentiles": {
          "percentiles": {
            "field": "kafka-performance.consumer_run_time" 
          }
        },
        "consumer_runtime_interval_buckets": {
            "date_histogram": {
              "field": "@timestamp",
              "fixed_interval": "1h"
            },
            "aggs": {
              "runtime_per_bucket": {
                "max": {
                  "field": "kafka-performance.consumer_run_time"
                }
              }
            }
        }
    }
}

Aggregation metadata to the rescue: Aggregations | Elasticsearch Guide [8.11] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.