# How to fetch all records from elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294>\
**Category:** Elasticsearch\
**Created:** [December 3, 2019, 6:40am UTC](https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294 "2019-12-03T06:40:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![navdeepk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navdeepk/32/58687_2.png) [@navdeepk](https://discuss.elastic.co/u/navdeepk)\
**Post date:** [December 3, 2019, 6:40am UTC](https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294/1 "2019-12-03T06:40:39Z")

</div>

I am working on Log analyzer tool.....Using Angular 6 on front end and node js on back end. By using filebeat tool to parse access logs, I have successfully insert logs in elasticsearch...

Now am getting problem by fetching records from elasticsearch ....Without given size how can i get all records ?? Kindly help

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 3, 2019, 10:00am UTC](https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294/2 "2019-12-03T10:00:09Z")

</div>

Take a look at [search\_after](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-request-body.html#request-body-search-search-after) or [scroll searching](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-request-body.html#request-body-search-scroll) in order to efficiently page through your data.

--Alex

---

<div class="post-metadata">

**Author:** ![navdeepk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navdeepk/32/58687_2.png) [@navdeepk](https://discuss.elastic.co/u/navdeepk)\
**Post date:** [December 4, 2019, 6:59am UTC](https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294/3 "2019-12-04T06:59:57Z")

</div>

Thanks for help.....Can i parse the logs from filebeat and store the data in mongo db ...If you have any idea ??

---

<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:** [January 1, 2020, 7:00am UTC](https://discuss.elastic.co/t/how-to-fetch-all-records-from-elasticsearch/210294/4 "2020-01-01T07:00:13Z")

</div>

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