No way of implementing page size on restHighLevelClient in java

287 Views Asked by At

I have such problem now, I have a requirement to migrate from spring data elasticsearch to restHighLevelClient, and also have to implement pagination, which was pretty easy in Spring data.

SearchResponse response = esClient.search(new SearchRequest("person")
    .source(new SearchSourceBuilder()
            .query(query)
            .from(from)
            .size(size)
    ));

with this we can specify the whole size of items only, which has nothing to do with pageSize (i.e the item size on each page). Now please any way of specifying the pageSize on "restHighLevelClient"

0

There are 0 best solutions below