# Not getting proper Response as per the count

**URL:** <https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986>\
**Category:** Elasticsearch\
**Created:** [January 29, 2020, 11:07am UTC](https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986 "2020-01-29T11:07:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toshif](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@Toshif](https://discuss.elastic.co/u/Toshif)\
**Post date:** [January 29, 2020, 11:07am UTC](https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986/1 "2020-01-29T11:07:49Z")

</div>

Hello,  
I am trying to retrieve 1500 records from ElasticSearch but in response I am getting only around 10 records.  
I am getting count as 1500, also in kibana same query returns 1500 records.  
But in response I am not getting all records.  
I am writing a standalone java program using HighLevelRestClient.  
Kindly 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:** [January 29, 2020, 11:55am UTC](https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986/2 "2020-01-29T11:55:24Z")

</div>

You need to set the size of the page. It's 10 by default.  
Set it to 1500 if you want to get 1500 results at once. Or play with from parameter as well if you want to navigate between pages.

---

<div class="post-metadata">

**Author:** ![Toshif](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@Toshif](https://discuss.elastic.co/u/Toshif)\
**Post date:** [January 29, 2020, 12:35pm UTC](https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986/3 "2020-01-29T12:35:25Z")

</div>

It worked, Thnx!

---

<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:** [February 26, 2020, 12:35pm UTC](https://discuss.elastic.co/t/not-getting-proper-response-as-per-the-count/216986/4 "2020-02-26T12:35:28Z")

</div>

Closed on February 26, 2020, 12:35pm UTC

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