Search scroll

Can anyone point me to any documentation regarding search scroll for the new java api client? I'm talking about this from the HLRC - Search Scroll API | Java REST Client [7.17] | Elastic.


Hi @toddcarv

Do you need an example?

That would be great thank you.

This request using scroll:

    SearchRequest request = SearchRequest.of(s ->
                    .query(MatchAllQuery.of(ma -> ma)._toQuery())
                    .scroll(Time.of(t -> t.time("60s"))));

    var result =, ObjectNode.class);

    var scrollId = result.scrollId();

    //pass scroll id
    ScrollRequest scrollRequest = ScrollRequest.of(s ->
            s.scrollId(scrollId).scroll(Time.of(t -> t.time("60s"))));
    var result = client.scroll(scrollRequest, ObjectNode.class);


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