Recall & Review
beginner
What is a mapping in Elasticsearch?
A mapping in Elasticsearch is like a blueprint that defines how documents and their fields are stored and indexed. It tells Elasticsearch what type of data each field holds, such as text, number, or date.
Click to reveal answer
beginner
Why do mappings define the document structure in Elasticsearch?
Mappings define document structure because they specify the data types and rules for each field. This helps Elasticsearch understand how to index and search the data efficiently.
Click to reveal answer
intermediate
How does mapping affect searching in Elasticsearch?
Mapping affects searching by determining how fields are analyzed and stored. For example, a text field might be broken into words for full-text search, while a keyword field is stored as is for exact matching.
Click to reveal answer
intermediate
What happens if you don't define a mapping before indexing documents?
If no mapping is defined, Elasticsearch tries to guess the data types automatically. This can lead to incorrect types and inefficient searches, so defining mappings helps avoid surprises.
Click to reveal answer
advanced
Can mappings be changed after documents are indexed?
Mappings are mostly fixed after indexing. You can add new fields, but changing existing field types is not allowed. This is why planning your mappings before indexing is important.
Click to reveal answer
What does a mapping in Elasticsearch primarily define?
✗ Incorrect
Mappings define how documents are structured and what data types each field has.
If you do not define a mapping, what does Elasticsearch do?
✗ Incorrect
Elasticsearch tries to guess the data types automatically if no mapping is provided.
Why is it important to define mappings before indexing?
✗ Incorrect
Defining mappings helps Elasticsearch index data correctly and search efficiently.
Which of the following can you NOT do after documents are indexed?
✗ Incorrect
Changing existing field types after indexing is not allowed in Elasticsearch.
How does mapping affect full-text search?
✗ Incorrect
Mapping defines how text fields are analyzed, which is essential for full-text search.
Explain why mappings are important for defining document structure in Elasticsearch.
Think about how Elasticsearch knows what kind of data each field holds.
You got /4 concepts.
Describe what happens if you index documents without defining a mapping first.
Consider the risks of automatic guessing.
You got /4 concepts.