Recall & Review
beginner
What is an index mapping in Elasticsearch?
An index mapping defines how documents and their fields are stored and indexed in Elasticsearch. It tells Elasticsearch the data types and rules for each field.
Click to reveal answer
beginner
Why do we need to define data types in index mappings?
Data types help Elasticsearch understand how to store, search, and sort the data correctly. For example, numbers, dates, and text are handled differently.
Click to reveal answer
intermediate
What happens if you don't define a mapping for a field in Elasticsearch?
Elasticsearch tries to guess the data type automatically using dynamic mapping. But this can lead to unexpected results or inefficient searches.
Click to reveal answer
intermediate
How can you change a field's mapping after the index is created?
You cannot change a field's mapping directly after creation. Instead, you create a new index with the desired mapping and reindex your data.
Click to reveal answer
beginner
What is the difference between 'text' and 'keyword' data types in Elasticsearch mappings?
'text' is used for full-text search and is analyzed (broken into words). 'keyword' is for exact matches and sorting, stored as is without analysis.
Click to reveal answer
What does an Elasticsearch index mapping define?
✗ Incorrect
Index mapping defines how documents and their fields are stored and indexed in Elasticsearch.
Which data type should you use for full-text search in Elasticsearch?
✗ Incorrect
'text' type is used for full-text search because it is analyzed into words.
What happens if you add a new field without defining it in the mapping?
✗ Incorrect
Elasticsearch uses dynamic mapping to guess the data type automatically.
Can you change a field's data type in an existing Elasticsearch index mapping?
✗ Incorrect
You cannot change a field's mapping after creation; you must create a new index and reindex data.
Which mapping type is best for sorting exact values?
✗ Incorrect
'keyword' type stores exact values and is best for sorting and filtering.
Explain what an Elasticsearch index mapping is and why it is important.
Think about how Elasticsearch knows what kind of data each field holds.
You got /3 concepts.
Describe the difference between 'text' and 'keyword' data types in Elasticsearch mappings and when to use each.
Consider searching for words versus filtering exact values.
You got /3 concepts.