APIs in elasticsearch accept an index name when working against a
specific index, and several indices when applicable. The index aliases
API allow to alias an index with a name, with all APIs automatically
converting the alias name to the actual index name. An alias can also be
mapped to more than one index, and when specifying it, the alias will
automatically expand to the aliases indices. An alias can also be
associated with a filter that will automatically be applied when
searching, and routing values.

Aliases with filters provide an easy way to create different "views" of
the same index. The filter can be defined using Query DSL and is applied
to all Search, Count, Delete By Query and More Like This operations with
this alias.

To create a filtered alias, first we need to ensure that the fields already
exist in the mapping:

As shown in the example above, search routing may contain several values
separated by comma. Index routing can contain only a single value.

If an operation that uses routing alias also has a routing parameter, an
intersection of both alias routing and routing specified in the
parameter is used. For example the following command will use "2" as a
routing value:

The get index alias api allows to filter by
alias name and index name. This api redirects to the master and fetches
the requested index aliases, if available. This api only serialises the
found index aliases.

Possible options:

index

The index name to get aliases for. Partially names are
supported via wildcards, also multiple index names can be specified
separated with a comma. Also the alias name for an index can be used.

alias

The name of alias to return in the response. Like the index
option, this option supports wildcards and the option the specify
multiple alias names separated by a comma.

ignore_unavailable

What to do is an specified index name doesn’t
exist. If set to true then those indices are ignored.

The rest endpoint is: /{index}/_alias/{alias}.

For future versions of Elasticsearch, the default Multiple Indices options will error if a requested index is unavailable. This is to bring
this API in line with the other indices GET APIs