Recall & Review
beginner
What is the purpose of highlighting in Elasticsearch search results?
Highlighting shows the parts of the text that match the search query, making it easier to see why a document was found.
Click to reveal answer
beginner
Which Elasticsearch query section is used to add highlighting to search results?
The
highlight section is added alongside the query in the search request to specify which fields to highlight.Click to reveal answer
intermediate
What does the
pre_tags and post_tags in Elasticsearch highlighting do?They define the HTML or text tags that wrap around the matched text to visually mark it, for example,
<em> and </em>.Click to reveal answer
beginner
How do you specify which fields to highlight in an Elasticsearch query?
Inside the
highlight section, use the fields object with field names as keys and empty objects or options as values.Click to reveal answer
intermediate
What is the default behavior if you do not specify
pre_tags and post_tags in Elasticsearch highlighting?Elasticsearch wraps matched text with
<em> and </em> tags by default.Click to reveal answer
In Elasticsearch, where do you add the highlighting instructions in a search request?
✗ Incorrect
Highlighting is specified in the
highlight section, which is part of the search request body.What tags does Elasticsearch use by default to wrap highlighted text?
✗ Incorrect
By default, Elasticsearch wraps matched text with
<em> and </em> tags.How do you specify multiple fields to highlight in Elasticsearch?
✗ Incorrect
You add each field as a key inside the
fields object with an empty object or options as the value.What is the effect of setting
number_of_fragments to 0 in highlighting?✗ Incorrect
Setting
number_of_fragments to 0 returns the entire field content as a single highlighted fragment.Which of these is NOT a valid use of the
highlight section in Elasticsearch?✗ Incorrect
Sorting is controlled by the
sort section, not by highlight.Explain how to add highlighting to an Elasticsearch search query and customize the tags used to mark matched text.
Think about where you put the highlight instructions and how to change the default <em> tags.
You got /3 concepts.
Describe the default behavior of Elasticsearch highlighting and how it helps users understand search results.
Focus on what the user sees and why highlighting is useful.
You got /3 concepts.