title: How to add dynamic alias to indexes in elasticsearch
body: <p>I have a index template configured to apply on a index pattern <code>products_*</code></p>
  <p>How each document in <code>products</code> will have two fields</p>
  <ul>
  <li><code>date</code></li>
  <li><code>country_code</code></li>
  </ul>
  <p>using the pipeline processor I wanted to create dynamic indexes like below</p>
  <ul>
  <li><code>products_2021_12_24_us</code></li>
  <li><code>products_2021_12_25_us</code></li>
  <li><code>products_2021_12_24_uk</code></li>
  </ul>
  <p>now i want to add alias for the indexes in the following behavior</p>
  <p>for a index <code>products_2021_12_24_us</code> the alias should be <code>products_us</code> and <code>products_2021_12_24</code>
  so that we can search the <code>US</code> products under one name and also for one date products under one name.</p>
  <p>What should i use here?
  Should i create multiple templates or one template can handle it all?</p>