// This file is autogenerated, DO NOT EDIT
// search/search-your-data/paginate-search-results.asciidoc:550

[source, python]
----
resp = client.search(
    index="my-index-000001",
    scroll="1m",
    slice={
        "id": 0,
        "max": 2
    },
    query={
        "match": {
            "message": "foo"
        }
    },
)
print(resp)

resp1 = client.search(
    index="my-index-000001",
    scroll="1m",
    slice={
        "id": 1,
        "max": 2
    },
    query={
        "match": {
            "message": "foo"
        }
    },
)
print(resp1)
----
