Recall & Review
beginner
What is the purpose of the Completion suggester in Elasticsearch?
The Completion suggester helps provide fast autocomplete or search-as-you-type functionality by suggesting possible completions for a given prefix.
Click to reveal answer
beginner
Which field type must be used in the mapping to enable the Completion suggester?
The field must be mapped as
completion type to enable the Completion suggester functionality.Click to reveal answer
intermediate
How do you define a Completion suggester query in Elasticsearch?
You define it inside the
_search request under the suggest section, specifying the field, prefix, and size of suggestions.Click to reveal answer
intermediate
What is the difference between
prefix and regex in Completion suggester queries?prefix matches suggestions starting with the given text, while regex allows pattern matching for more flexible suggestions.Click to reveal answer
advanced
Why is the Completion suggester faster than a regular prefix query?
Because it uses a specialized data structure called a FST (Finite State Transducer) optimized for prefix lookups, making suggestions very fast.
Click to reveal answer
Which field type enables the Completion suggester in Elasticsearch?
✗ Incorrect
Only the 'completion' field type supports the Completion suggester functionality.
Where do you specify the Completion suggester in an Elasticsearch search request?
✗ Incorrect
The Completion suggester is defined inside the 'suggest' section of the search request.
What does the 'prefix' parameter do in a Completion suggester query?
✗ Incorrect
'prefix' matches suggestions that start with the given text.
Which data structure does the Completion suggester use for fast lookups?
✗ Incorrect
The Completion suggester uses a Finite State Transducer (FST) for efficient prefix matching.
Can the Completion suggester handle fuzzy matching by default?
✗ Incorrect
The Completion suggester does not support fuzzy matching by default; it matches exact prefixes.
Explain how to set up and use the Completion suggester in Elasticsearch.
Think about mapping, indexing, and querying steps.
You got /4 concepts.
Describe why the Completion suggester is efficient for autocomplete compared to regular text queries.
Focus on data structure and performance.
You got /4 concepts.