# Wrong date format pattern for origination date in doc?

**URL:** https://discuss.elastic.co/t/wrong-date-format-pattern-for-origination-date-in-doc/308971
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [July 6, 2022, 3:42am UTC](https://discuss.elastic.co/t/wrong-date-format-pattern-for-origination-date-in-doc/308971 "2022-07-06T03:42:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)
#### Post date: [July 6, 2022, 3:42am UTC](https://discuss.elastic.co/t/wrong-date-format-pattern-for-origination-date-in-doc/308971/1 "2022-07-06T03:42:01Z")

</div>

Hello .

I would like to confirm the _pattern_ used to parse _origination date_ from index name.  
I am using elasticsearch `7.17.4` .

> **[Index lifecycle management settings in Elasticsearch | Elasticsearch Guide...](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ilm-settings.html#_index_level_settings)**

It says,

> The index name must match the pattern `^.*-{date_format}-\\d+` , where the `date_format` is `yyyy.MM.dd`

But _origination\_date_ was parsed from index name `zoom-meetings-2022.07.06` .

```auto
GET zoom-meetings-2022.07.06/_settings
{
  "zoom-meetings-2022.07.06" : {
    "settings" : {
      "index" : {
        "lifecycle" : {
          "name" : "zoom-meetings",
          "parse_origination_date" : "true",
          "origination_date" : "1657065600000"
        },
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "number_of_shards" : "1",
        "provided_name" : "zoom-meetings-2022.07.06",
        "creation_date" : "1657078713263",
        "number_of_replicas" : "1",
        "uuid" : "tNTzffNlRm-Q2jIiP6c3wQ",
        "version" : {
          "created" : "7170499"
        }
      }
    }
  }
}

GET zoom-meetings-2022.07.06/_ilm/explain
{
  "indices" : {
    "zoom-meetings-2022.07.06" : {
      "index" : "zoom-meetings-2022.07.06",
      "managed" : true,
      "policy" : "zoom-meetings",
      "lifecycle_date_millis" : 1657065600000,
      "age" : "3.65h",
      "phase" : "delete",
      "phase_time_millis" : 1657078713380,
      "action" : "delete",
      "action_time_millis" : 1657078713380,
      "step" : "wait-for-shard-history-leases",
      "step_time_millis" : 1657078713380,
      "phase_execution" : {
        "policy" : "zoom-meetings",
        "phase_definition" : {
          "min_age" : "10m",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        },
        "version" : 7,
        "modified_date_in_millis" : 1657076695678
      }
    }
  }
}

```

I have an index pattern as below.

```auto
PUT _index_template/zoom-meetings
{
  "index_patterns": ["zoom-meetings-*"],
  "template": {
    "settings": {
      "index.lifecycle.name": "zoom-meetings",
      "index.lifecycle.parse_origination_date": true
    }
  }
}

```

Is _origination date_ parsed as long as the _date format_ is included ?

Thanks,  
Yu

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 3, 2022, 3:42am UTC](https://discuss.elastic.co/t/wrong-date-format-pattern-for-origination-date-in-doc/308971/2 "2022-08-03T03:42:56Z")

</div>

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