Hello,
I want to paginate my search results and trying to use from-size (https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-from-size.html) feature.
When I send a request from console, I got right answer from my elasticsearch.
curl -XGET "localhost:9200/sampleindex/_search?pretty" -d '{"from":2,"size":1,"query":{"match_all":{}}}'
But if I use java api like below it seems that "from" part does not work because it returns first result for that query.
searchBuilder = searchBuilder.setFrom(2).setSize(1);
Could you help me how can I solve this?
Thanks in advance.