Leveraging Index Aliases in Elasticsearch 7.13

2 hours
  • 3 Learning Objectives

About this Hands-on Lab

By using index aliases in Elasticsearch, we can search one or more indices using a friendly, non-permanent name. In this hands-on lab, you will create, use, and remove aliases in Elasticsearch.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Add the Alias “sample_data” to the Appropriate Indices

From the Kibana console, apply the sample_data alias to the kibana_sample_data_ecommerce, kibana_sample_data_flights, and kibana_sample_data_logs indices.

Add the Alias “othello” to the `shakespeare` Index with the Necessary Filtering

From the Kibana console, apply the othello alias, which should filter documents where the play_name.keyword field is "Othello", to the shakespeare index.

Configure the “sample_data” Component Template and “sample_data_bank” Index Template with the Appropriate Aliases

From the Kibana console, do the following:

  • Create the component template sample_data, which should be configured to apply the sample_data alias.
  • Create the sample_data_bank index template, which should:
    • Match indices that start with "accounts-"
    • Be composed of the sample_data component template.
    • Include the bank alias.
    • Be configured to create indices with one primary and zero replica shards.

Additional Resources

You work as a technical instructor who is going to teach an intro to Elasticsearch course to a group of IT professionals. Your hands-on course is almost complete. To make it easier to work with the sample data, you need to create the following aliases:

Alias 1: The alias sample_data should be applied to the kibana_sample_data_ecommerce, kibana_sample_data_flights, and kibana_sample_data_logs indices.

Alias 2: The alias othello should filter documents, where the play_name.keyword field is "Othello" and be applied to the shakespeare index.

Alias 3:

  • The component template sample_data should be configured to apply the sample_data alias.
  • The sample_data_bank index template should match any index that starts with "accounts-".
  • The sample_data_bank index template should be composed of the sample_data component template.
  • The sample_data_bank index template should also include the bank alias.
  • The sample_data_bank index template should be configured to create indices with one primary and zero replica shards.

Your es1 node has a Kibana instance that can be accessed in your local web browser by navigating to the public IP address of the es1 node (example: http://public_ip). To log in, use the elastic user with the password elastic_acg.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?