Complete the code to start a scroll search with a 1 minute scroll context.
{
"scroll": "[1]",
"size": 100,
"query": {
"match_all": {}
}
}The scroll parameter defines how long Elasticsearch keeps the search context alive. "1m" means 1 minute, which is a common choice.
Complete the code to retrieve the next batch of results using the scroll ID.
{
"scroll": "1m",
"scroll_id": "[1]"
}The scroll_id is a unique string returned by Elasticsearch after the initial scroll search. You use it to get the next batch of results.
Fix the error in the scroll request by completing the missing parameter.
{
"scroll": "1m",
"[1]": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA"
}The correct parameter name is 'scroll_id' with an underscore, exactly as Elasticsearch expects.
Fill both blanks to create a scroll search that fetches 50 results and keeps the context alive for 2 minutes.
{
"scroll": "[1]",
"size": [2],
"query": {
"match_all": {}
}
}Setting scroll to '2m' keeps the context alive for 2 minutes. Size 50 fetches 50 results per batch.
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.
{
"scroll": "[1]",
"[2]": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAA",
"size": [3]
}Scroll time is set to '3m' for 3 minutes. The parameter name is 'scroll_id'. Size 100 fetches 100 results per batch.