Recall & Review
beginner
What is an index in Elasticsearch?
An index in Elasticsearch is like a folder where documents are stored. It helps organize and quickly find data, similar to how a library index helps find books.
Click to reveal answer
beginner
Which HTTP method is used to create an index in Elasticsearch?
The PUT method is used to create an index in Elasticsearch. You send a PUT request to the server with the index name.
Click to reveal answer
intermediate
What is the purpose of the 'mappings' section when creating an index?
Mappings define the structure of the documents in the index, like what fields exist and their data types. It helps Elasticsearch understand how to store and search the data.
Click to reveal answer
beginner
Show a simple example of creating an index named 'library' in Elasticsearch.
Use this command:<br>
PUT /library<br>This creates an empty index called 'library' ready to store documents.
Click to reveal answer
intermediate
Why should you define settings like number_of_shards when creating an index?
Settings like number_of_shards control how data is split and stored across servers. This affects speed and reliability, like dividing a big book into chapters for easier reading.
Click to reveal answer
Which HTTP method creates a new index in Elasticsearch?
✗ Incorrect
PUT is used to create or update an index in Elasticsearch.
What does the 'mappings' section define when creating an index?
✗ Incorrect
Mappings define the structure and data types of documents in the index.
What is the default number of shards when creating an index if not specified?
✗ Incorrect
By default, Elasticsearch creates 5 primary shards per index (before version 7.0). Since version 7.0, the default is 1 primary shard.
Which of these is a valid command to create an index named 'books'?
✗ Incorrect
PUT /books creates a new index named 'books'.
Why might you want to customize index settings when creating it?
✗ Incorrect
Custom settings help control how data is stored and how fast searches run.
Explain how to create a basic index in Elasticsearch and why it is important.
Think about how you organize files in folders.
You got /4 concepts.
Describe the role of mappings and settings when creating an Elasticsearch index.
Consider how a blueprint and building materials affect a house.
You got /3 concepts.