What is the Elasticsearch-py equivalent to alias actions? : <p>I am trying to implement <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/multiple-indices.html#multiple-indices" rel="noreferrer">multiples indices</a> approach using <a href="https://elasticsearch-dsl.readthedocs.io/en/latest/" rel="noreferrer">elasticsearch-dsl</a>. There are basically two steps:</p>

<p><strong>1. Create aliases:</strong></p>

<pre><code>PUT /tweets_1/_alias/tweets_search 
PUT /tweets_1/_alias/tweets_index 
</code></pre>

<p><strong>2. Change alias when necessary:</strong></p>

<pre><code>POST /_aliases
{
  "actions": [
    { "add":    { "index": "tweets_2", "alias": "tweets_search" }}, 
    { "remove": { "index": "tweets_1", "alias": "tweets_index"  }}, 
    { "add":    { "index": "tweets_2", "alias": "tweets_index"  }}  
  ]
}
</code></pre>

<p>I could only implement the step 1 using <a href="http://elasticsearch-py.readthedocs.io/en/master/index.html" rel="noreferrer">elasticsearch-py</a> (not the dsl):</p>

<pre><code>from elasticsearch.client import IndicesClient
IndicesClient(client).("tweets_1", "tweets_search")
IndicesClient(client).("tweets_1", "tweets_index")
</code></pre>

<p>I have no clue how to do that for step 2. So, what would be the equivalent in elasticsearch-dsl (or at least in elasticsearch-py)?</p>
