In order for an index to use an ILM policy to manage its lifecycle we must
first define a lifecycle policy for it to use. The following request creates
a policy called
my_policy in Elasticsearch which we can later use to manage
ILM will manage an index using the policy defined in the
index.lifecycle.name index setting. If this setting does not exist in the
settings for a particular index ILM will not manage that index.
To set the policy for an index there are two options: 1. Apply the policy to an index template and bootstrap creating the first index 2. Apply the policy to a new index in a create index request