# How to retrive all Json documents from index using java

**URL:** <https://discuss.elastic.co/t/how-to-retrive-all-json-documents-from-index-using-java/228867>\
**Category:** Elasticsearch\
**Created:** [April 20, 2020, 1:02pm UTC](https://discuss.elastic.co/t/how-to-retrive-all-json-documents-from-index-using-java/228867 "2020-04-20T13:02:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay123](https://avatars.discourse-cdn.com/v4/letter/v/a9a28c/32.png) [@vinay123](https://discuss.elastic.co/u/vinay123)\
**Post date:** [April 20, 2020, 1:02pm UTC](https://discuss.elastic.co/t/how-to-retrive-all-json-documents-from-index-using-java/228867/1 "2020-04-20T13:02:03Z")

</div>

Hello ,

i want to retrive all the documents from index using java, do we have any query .

i want to get entire Json file as object, so that i can access elements which i want ? any possibility ? how

i saw some source : [https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/scrolling.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/scrolling.html)

but that Url is not working.

Thanks for help..!!

---

<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:** [April 20, 2020, 2:45pm UTC](https://discuss.elastic.co/t/how-to-retrive-all-json-documents-from-index-using-java/228867/2 "2020-04-20T14:45:30Z")

</div>

Have a look at [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-search-scroll.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-search-scroll.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2020, 2:45pm UTC](https://discuss.elastic.co/t/how-to-retrive-all-json-documents-from-index-using-java/228867/3 "2020-05-18T14:45:42Z")

</div>

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