How to visualize a query in kibana

Hello! need help with visualizing this query in kibana:

{
  "size": 0,
  "aggs": {
    "orders_per_day": {
      "terms": {
        "script": {
          "lang": "painless",
          "source": "doc['ctime'].value.dayOfWeek"
        }
      },
      "aggs": {
        "avg_per_hour": {
          "bucket_script": {
            "buckets_path": {
              "count": "_count"
            },
            "script": "params.count / 24"
          }
        }
      }
    }
  }
}

my log

{
        "_index" : "test",
        "_type" : "_doc",
        "_id" : "09-20-00-246697_test.log",
        "_version" : 8,
        "_score" : null,
        "_source" : {
          "hash" : {
            "sha1" : "ded3628a07efdce5cb972d24020852bb16e35a48"
          },
          "filename" : "09-20-00-246697_test.log",
          "ctime" : "2021-12-28T06:20:00.246Z",
          "@version" : "1",
          "tags" : [
            "GT",
            "beats_input_raw_event"
          ]

Hi there -- Bucket script aggregations are only available in Kibana when using TSVB visualizations. These two forum posts give some nice examples of how to use it, hopefully it helps point you in the right direction:

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