Aliasedit

action: alias
description: "Add/Remove selected indices to or from the specified alias"
options:
  name: alias_name
add:
  filters:
  - filtertype: ...
remove:
  filters:
  - filtertype: ...

Empty values and commented lines will result in the default value, if any, being selected. If a setting is set, but not used by a given action, it will be ignored.

This action adds and/or removes indices from the alias identified by name

The filters under the add and remove directives define which indices will be added and/or removed. This is an atomic action, so adds and removes happen instantaneously.

The extra_settings option allows the addition of extra settings with the add directive. These settings are ignored for remove. An example of how these settings can be used to create a filtered alias might be:

action: alias
description: "Add/Remove selected indices to or from the specified alias"
options:
  name: alias_name
  extra_settings:
    filter:
      term:
        user: kimchy
add:
  filters:
  - filtertype: ...
remove:
  filters:
  - filtertype: ...

Before creating a filtered alias, first ensure that the fields already exist in the mapping.

Learn more about adding filtering and routing to aliases in the Elasticsearch Alias API documentation.

Required settingsedit