Bird
0
0

Why might Elasticsearch return multiple highlight fragments for a single field in the results?

hard🧠 Conceptual Q10 of 15
Elasticsearch - Search Results and Scoring
Why might Elasticsearch return multiple highlight fragments for a single field in the results?
ABecause highlighting only works on multi-valued fields.
BBecause the field contains multiple matched text parts separated by fragment_size.
CBecause the field is indexed multiple times with different analyzers.
DBecause Elasticsearch duplicates highlights for performance.
Step-by-Step Solution
Solution:
  1. Step 1: Understand fragment_size and fragments

    Elasticsearch splits highlights into fragments based on fragment_size to show multiple snippets.
  2. Step 2: Clarify why multiple fragments appear

    Multiple matched parts in a long field cause multiple highlight fragments.
  3. Final Answer:

    Because the field contains multiple matched text parts separated by fragment_size. -> Option B
  4. Quick Check:

    Multiple fragments = multiple matched snippets [OK]
Quick Trick: Multiple fragments show multiple matched snippets [OK]
Common Mistakes:
MISTAKES
  • Thinking highlights are duplicated for speed
  • Confusing indexing with highlighting
  • Assuming only multi-valued fields highlight

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes