0
0
Elasticsearchquery~10 mins

Scroll API for deep pagination in Elasticsearch - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a scroll search with a 1 minute scroll context.

Elasticsearch
{
  "scroll": "[1]",
  "size": 100,
  "query": {
    "match_all": {}
  }
}
Drag options to blanks, or click blank then click option'
A5m
B1s
C10m
D1m
Attempts:
3 left
💡 Hint
Common Mistakes
Using seconds like '1s' which is too short for scroll context.
Omitting the scroll parameter entirely.
2fill in blank
medium

Complete the code to retrieve the next batch of results using the scroll ID.

Elasticsearch
{
  "scroll": "1m",
  "scroll_id": "[1]"
}
Drag options to blanks, or click blank then click option'
Aabc123
Bscroll_id
Cnext_batch
DscrollId
Attempts:
3 left
💡 Hint
Common Mistakes
Using the literal string 'scroll_id' instead of the actual scroll ID value.
Confusing scroll_id with other parameter names.
3fill in blank
hard

Fix the error in the scroll request by completing the missing parameter.

Elasticsearch
{
  "scroll": "1m",
  "[1]": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA"
}
Drag options to blanks, or click blank then click option'
Ascroll_id
BscrollId
Cscrollid
Dscroll-id
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase like 'scrollId' which causes errors.
Using hyphen or lowercase without underscore.
4fill in blank
hard

Fill both blanks to create a scroll search that fetches 50 results and keeps the context alive for 2 minutes.

Elasticsearch
{
  "scroll": "[1]",
  "size": [2],
  "query": {
    "match_all": {}
  }
}
Drag options to blanks, or click blank then click option'
A2m
B50
C100
D1m
Attempts:
3 left
💡 Hint
Common Mistakes
Using size larger than intended like 100.
Setting scroll time too short like '1m'.
5fill in blank
hard

Fill all three blanks to create a scroll request that uses the scroll ID, sets scroll time to 3 minutes, and fetches the next batch.

Elasticsearch
{
  "scroll": "[1]",
  "[2]": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA",
  "size": [3]
}
Drag options to blanks, or click blank then click option'
Ascroll_id
B1m
C100
D3m
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong parameter name like 'scrollId'.
Setting scroll time too short or size too small.