# How can I fetch in between documents using Java API?

**URL:** <https://discuss.elastic.co/t/how-can-i-fetch-in-between-documents-using-java-api/111245>\
**Category:** Elasticsearch\
**Created:** [December 12, 2017, 6:43am UTC](https://discuss.elastic.co/t/how-can-i-fetch-in-between-documents-using-java-api/111245 "2017-12-12T06:43:12Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 12, 2017, 7:46am UTC](https://discuss.elastic.co/t/how-can-i-fetch-in-between-documents-using-java-api/111245/8 "2017-12-12T07:46:33Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Use the `from` and `size` parameters of the `SearchSourceBuilder` object.  
See [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-search.html#\_using\_the\_searchsourcebuilder](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-search.html#_using_the_searchsourcebuilder)

---

_[View the full topic](https://discuss.elastic.co/t/how-can-i-fetch-in-between-documents-using-java-api/111245)._
