What is the default scroll value in Scroll API?

i.e. for how long should the search context stay opened, if no value is provided?

Hi @Pisush,

To create a scroll context you most specify scroll parameter in _search request, so there is no default value.

Create a scroll context and keep the “search context” alive for 1 minute:

POST /twitter/tweet/_search?scroll=1m
{
    "size": 100,
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    }
}

Search without scroll:

POST /twitter/tweet/_search
{
    "size": 100,
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    }
}

Hope it helps.

Cheers,
LG

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.