1
    {
  "size": 0,
  "aggs": {
    "messages_per_channel": {
      "terms": {
        "field": "channelId"
      },
      "aggs": {
        "total_messages_per_day_of_week": {
          "terms": {
            "script": {
              "lang": "painless",
              "source": "doc['date'].value.dayOfWeek"
            }
          },

How could I apply a time_zone parameter to this painless script?

Sritzl
  • 11
  • 2
  • Maybe apply timezone to doc['date'].value and then call dayOfWeek on top This might help: https://stackoverflow.com/questions/2891361/how-to-set-time-zone-of-a-java-util-date – Muhammad Ali Jul 02 '19 at 15:25

0 Answers0