# Elasticsearch query to return all records

**URL:** <https://discuss.elastic.co/t/elasticsearch-query-to-return-all-records/279998>\
**Category:** Elasticsearch\
**Created:** [July 29, 2021, 2:12pm UTC](https://discuss.elastic.co/t/elasticsearch-query-to-return-all-records/279998 "2021-07-29T14:12:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![varsha\_dusa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varsha_dusa/32/83040_2.png) [@varsha\_dusa](https://discuss.elastic.co/u/varsha_dusa)\
**Post date:** [July 29, 2021, 2:12pm UTC](https://discuss.elastic.co/t/elasticsearch-query-to-return-all-records/279998/1 "2021-07-29T14:12:07Z")

</div>

I have a small database in [Elasticsearch](https://hkrtrainings.com/elasticsearch-training) and for testing purposes would like to pull all records back. I am attempting to use a URL of the form...

```auto
http://localhost:9200/foo/_search?pretty=true&q={'matchAll':{''}}

```

Can someone give me the URL you would use to accomplish this, please?

---

<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 29, 2021, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-query-to-return-all-records/279998/2 "2021-07-29T15:27:21Z")

</div>

Welcome!

Up to 10000 documents, you can use:

```
http://localhost:9200/foo/_search?size=10000
```

---

<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:** [August 26, 2021, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-query-to-return-all-records/279998/3 "2021-08-26T15:27:27Z")

</div>

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