# Return big amount of values without paging

**URL:** <https://discuss.elastic.co/t/return-big-amount-of-values-without-paging/235369>\
**Category:** Elasticsearch\
**Created:** [June 2, 2020, 3:57pm UTC](https://discuss.elastic.co/t/return-big-amount-of-values-without-paging/235369 "2020-06-02T15:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivgenik](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@ivgenik](https://discuss.elastic.co/u/ivgenik)\
**Post date:** [June 2, 2020, 3:57pm UTC](https://discuss.elastic.co/t/return-big-amount-of-values-without-paging/235369/1 "2020-06-02T15:57:55Z")

</div>

Hello,  
Lets say I got an index with a big amount of documents.  
Each one has a field called UniqueId.  
I need to create a query with a simple filter and return all of the uniqueIds that answers the query.  
The data looks like:

My document:  
{  
...  
DocNum: 123,  
UniqueId: 232-32321-1  
...  
}

I read that in terms of response size it is not recommended to go over 10,000 records?  
Is it also true if I cut my response to only contain this 1 field inside each \_source? of the 10,000++ responses?

So that the response will look like :  
"hits": [  
{  
"\_index": "",  
"\_type": "\_doc",  
"\_id": "",  
"\_score": null,  
"\_source": {  
"UniqueId": 232-32321-1  
}}

If it is a problem can it be solved by aggregating the result of the uniqueIds instead? or will it result in having the same "max" size problem?

P.S.  
Sadly I cant use paging for this.

---

<div class="post-metadata">

**Author:** ![ivgenik](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@ivgenik](https://discuss.elastic.co/u/ivgenik)\
**Post date:** [June 15, 2020, 3:05pm UTC](https://discuss.elastic.co/t/return-big-amount-of-values-without-paging/235369/2 "2020-06-15T15:05:21Z")

</div>

I ended up using the \_source option as mentioned to return only one field.  
The default max size seem to be 30,000 now.  
My case should be pretty rare and I think it answers my current needs since the relevant query should not hit anywhere near 30,000 values.

---

<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:** [July 13, 2020, 3:05pm UTC](https://discuss.elastic.co/t/return-big-amount-of-values-without-paging/235369/3 "2020-07-13T15:05:23Z")

</div>

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