What is the default scroll value in Scroll API?


(Natalie) #1

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


(Luiz Santos) #2

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


(system) #3

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