anchor.diff:  // CONSOLE
   // TEST[continued]
   
  -[float]
   [[aliases-routing]]
   ===== Routing
   
  
positive.code: // CONSOLE
  // TEST[continued]
  
  [float]
  [[aliases-write-index]]
  ===== Write Index
  
  It is possible to associate the index pointed to by an alias as the write index.
  When specified, all index and update requests against an alias that point to multiple
  
negative.code: associated with a filter that will automatically be applied when
  searching, and routing values. An alias cannot have the same name as an index.
  
  
  [[indices-aliases-api-query-params]]
  ==== {api-query-parms-title}
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  
  
  [[indices-aliases-api-request-body]]
  ==== {api-request-body-title}
  
  `actions`::
  +
  --
  (Required, array of actions)
  Set of actions to perform.
  Valid actions include:
  
  `add`::
  Adds an alias to an index.
  
  `remove`::
  Removes an alias from an index.
  
  `remove_index`::
  Deletes an index or index alias,
  like the <<indices-delete-index,delete index API>>.
  
  You can perform these actions on alias objects.
  Valid parameters for alias objects include:
  
  `index`::
  (String)
  Wildcard expression of index names
  used to perform the action.
  +
  If the `indices` parameter is not specified,
  this parameter is required.
  
  `indices`::
  (Array)
  Array of index names
  used to perform the action.
  +
  If the `index` parameter is not specified,
  this parameter is required.
  
  `alias`::
  (String)
  Comma-separated list or wildcard expression of index alias names to
  add, remove, or delete.
  +
  If the `aliases` parameter is not specified,
  this parameter is required for the `add` or `remove` action.
  
  `aliases`::
  (String)
  Comma-separated list or wildcard expression of index alias names to
  add, remove, or delete.
  +
  If the `alias` parameter is not specified,
  this parameter is required for the `add` or `remove` action.
  
  `filter`::
  (Optional, query object)
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index-alias-filter]
  +
  See <<filtered>> for an example.
  
  `is_write_index`::
  (Optional, boolean)
  If `true`, assigns the index as an alias's write index.
  Defaults to `false`.
  +
  An alias can have one write index at a time.
  +
  See <<aliases-write-index>> for an example.
  +
  [IMPORTANT]
  ====
  Aliases that do not explicitly set `is_write_index: true` for an index, and
  only reference one index, will have that referenced index behave as if it is the write index
  until an additional index is referenced. At that point, there will be no write index and
  writes will be rejected.
  ====
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index-routing]
  +
  See <<aliases-routing>> for an example.
  
  `index_routing`::
  (Optional, string)
  Custom <<mapping-routing-field, routing value>> used
  for the alias's indexing operations.
  +
  See <<aliases-routing>> for an example.
  
  `search_routing`::
  `index_routing`::
  (Optional, string)
  Custom <<mapping-routing-field, routing value>> used
  for the alias's search operations.
  +
  See <<aliases-routing>> for an example.
  --
  
  
  [[indices-aliases-api-example]]
  ==== {api-examples-title}
  
  [[indices-aliases-api-add-alias-ex]]
  ===== Add an alias
  
  The following request adds the `alias1` alias to the `test1` index.
  
  [source,js]
  --------------------------------------------------
  