Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My application will create Elasticsearch index at hourly interval.

Pattern: test-yyyy-mm-dd-HH

Example indices are test-2020-10-01-01, test-2020-10-01-02 and so on

For example, Say current time is Thu Dec 31 13:26:20 UTC 2020, I will run the following template, this will pattern will effect from 2020-12-31-14 . But I want to make the template effect from 2021-01-01-00 (starting from beginning of the day). Is it possible to do it?

PUT _index_template/daily_logs
{
  "index_patterns": [
    "test-*"
  ],
  "template": {
    "aliases": {
      "my_logs": {}
    },
    "settings": {
      "number_of_shards": 2,
      "number_of_replicas": 1
    },
    "mappings": {
      "properties": {
        "value": {
          "type": "double"
        }
        "name": {
          "type": "keyword"
        }
      }
    }
  }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
337 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...