# URI search query with size -1 doesn't return all the results

**URL:** <https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289>\
**Category:** Elasticsearch\
**Created:** [July 1, 2019, 10:29am UTC](https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289 "2019-07-01T10:29:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raameeil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raameeil/32/40889_2.png) [@raameeil](https://discuss.elastic.co/u/raameeil)\
**Post date:** [July 1, 2019, 10:29am UTC](https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289/1 "2019-07-01T10:29:22Z")

</div>

Hi,

I am using version 6.4.2 and when I run a URI search like:

GET my\_index/\_search?q=version:197&size=-1

I expect that all the hits will be returned, but I get only 10 results out of the tens of hits that should return.

Setting size=-2 returns an error (which is expected) and setting size to any number above 10, returns the requested size (if enough hits are available).

Is there a known bug about this or is size=-1 not supported for URI search?

Thanks.

---

<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:** [July 1, 2019, 10:41am UTC](https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289/2 "2019-07-01T10:41:32Z")

</div>

I have never heard about this `-1` value.

Anyway, to extract all data if above 10000, use the scroll API.

---

<div class="post-metadata">

**Author:** ![raameeil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raameeil/32/40889_2.png) [@raameeil](https://discuss.elastic.co/u/raameeil)\
**Post date:** [July 1, 2019, 1:30pm UTC](https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289/3 "2019-07-01T13:30:28Z")

</div>

Thanks David.

Thanks for clarifying this.

---

<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 29, 2019, 1:30pm UTC](https://discuss.elastic.co/t/uri-search-query-with-size-1-doesnt-return-all-the-results/188289/4 "2019-07-29T13:30:31Z")

</div>

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