Bird
0
0

This highlight query returns an error:

medium📝 Debug Q7 of 15
Elasticsearch - Search Results and Scoring
This highlight query returns an error:
"highlight": {"fields": {"content": {"fragment_size": -1}}}

What is the problem?
Afragment_size cannot be negative; it must be zero or positive.
Bfragment_size is not a valid highlight parameter.
CFields cannot have parameters inside highlight.
DThe content field must be numeric to use fragment_size.
Step-by-Step Solution
Solution:
  1. Step 1: Understand fragment_size parameter

    fragment_size controls snippet length and must be zero or positive.
  2. Step 2: Identify invalid value

    Negative fragment_size is invalid and causes error.
  3. Final Answer:

    fragment_size cannot be negative; it must be zero or positive. -> Option A
  4. Quick Check:

    fragment_size ≥ 0 required [OK]
Quick Trick: fragment_size must be zero or positive [OK]
Common Mistakes:
MISTAKES
  • Using negative fragment_size
  • Thinking fragment_size is invalid parameter
  • Assuming fields can't have parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes