# How to be warned when the result size is truncated to 10

**URL:** <https://discuss.elastic.co/t/how-to-be-warned-when-the-result-size-is-truncated-to-10/35043>\
**Category:** Elasticsearch\
**Created:** [November 19, 2015, 11:34am UTC](https://discuss.elastic.co/t/how-to-be-warned-when-the-result-size-is-truncated-to-10/35043 "2015-11-19T11:34:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leethaksor](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@leethaksor](https://discuss.elastic.co/u/leethaksor)\
**Post date:** [November 19, 2015, 11:34am UTC](https://discuss.elastic.co/t/how-to-be-warned-when-the-result-size-is-truncated-to-10/35043/1 "2015-11-19T11:34:45Z")

</div>

This is an issue that has burned me many times. I write a query and see that it returns reasonable results and put it into code. Later I notice that the results aren't quite that reasonable after all. After a bit of digging I find that the results have been truncated to the first 10 items at some point and the rest of the query has continued from that. Is there a warning mode that would tell me that this has happened? It's really frustrating to try to stick "size: 0" everywhere especially since some aggregations treat 0 to actually mean 0.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [November 19, 2015, 2:14pm UTC](https://discuss.elastic.co/t/how-to-be-warned-when-the-result-size-is-truncated-to-10/35043/2 "2015-11-19T14:14:03Z")

</div>

Unfortunately we do this on purpose since `size:0` doesn't scale well to high-cardinality fields. If you know that your fields have a low cardinality, then the only way is to set size:0 explicitly. A safer option, if you expect the cardianlity to be less than N, would be to request N+1 terms (size:N+1) and fail if N+1 terms are actually returned.

---

<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 5, 2017, 11:37pm UTC](https://discuss.elastic.co/t/how-to-be-warned-when-the-result-size-is-truncated-to-10/35043/3 "2017-07-05T23:37:16Z")

</div>

Closed on July 5, 2017, 11:37pm UTC


