The index aliases API allows you to create another name for an index or multiple indices and then use it as an alternative name in an index operation. The alias APIs give us flexibility in the following aspects:
- Re-indexing with zero downtime
- Grouping multiple indices
- Views on a subset of documents
For a simple case, use _alias. For complex operations, _aliases. In this section, we will introduce the basic index alias CRUD APIs and practice each one:
- Create Index Alias API: Create an alternative name for an index or multiple indices. The following screenshot shows the creation of the index alias, cf_etf_1, for the index, cf_etf:
The syntax of the index (that is, cf_etf) can be * | _all | glob pattern | name1
,name2
,and so on. This means that a single alias can reference multiple indices.
- Get Index Alias API: This API allows you to retrieve information from...