Bird
Raised Fist0

Which of the following is the correct way to start a scroll search request in Elasticsearch using JSON?

easy📝 Syntax Q12 of Q15
Elasticsearch - Advanced Patterns
Which of the following is the correct way to start a scroll search request in Elasticsearch using JSON?
A{"scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA", "size": 100}
B{"query": {"match_all": {}}, "scroll": "1m", "size": 100}
C{"query": {"match": {"field": "value"}}, "timeout": "1m"}
D{"scroll": "1m", "update": true}
Step-by-Step Solution
Solution:
  1. Step 1: Identify scroll search syntax

    Starting a scroll requires a query, a scroll time, and size for batch size.
  2. Step 2: Analyze options

    {"query": {"match_all": {}}, "scroll": "1m", "size": 100} includes query, scroll time, and size correctly. {"scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA", "size": 100} uses scroll_id which is for continuing scroll, not starting. {"query": {"match": {"field": "value"}}, "timeout": "1m"} lacks scroll parameter. {"scroll": "1m", "update": true} has invalid update field.
  3. Final Answer:

    {"query": {"match_all": {}}, "scroll": "1m", "size": 100} -> Option B
  4. Quick Check:

    Start scroll = query + scroll + size [OK]
Quick Trick: Start scroll with query + scroll + size keys [OK]
Common Mistakes:
MISTAKES
  • Using scroll_id to start scroll instead of continue
  • Omitting the scroll parameter
  • Confusing scroll with timeout or update

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes