在Elasticsearch中,如何将时区应用于“源”:“ doc ['date']。value.dayOfWeek”

时间:2019-02-21 13:45:05

标签: elasticsearch elasticsearch-painless

    {
  "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"
            }
          },

如何将time_zone参数应用于此脚本?

0 个答案:

没有答案