# Retrieve multiple documents in elasticsearch filter

**URL:** https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751
**Category:** Logstash
**Created:** [July 29, 2019, 5:19pm UTC](https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751 "2019-07-29T17:19:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jdcohen220](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jdcohen220](https://discuss.elastic.co/u/jdcohen220)
#### Post date: [July 29, 2019, 5:19pm UTC](https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751/1 "2019-07-29T17:19:09Z")

</div>

Hi,

Is it possible to retrieve multiple elasticsearch documents from a query using the elasticsearch filter plugin? All the docs show use cases with a single log document.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 29, 2019, 7:21pm UTC](https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751/2 "2019-07-29T19:21:44Z")

</div>

The existence of the [result\_size](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elasticsearch.html#plugins-filters-elasticsearch-result_size) option suggests to me that it is possible.

---

<div class="post-metadata">

### Author: ![jdcohen220](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jdcohen220](https://discuss.elastic.co/u/jdcohen220)
#### Post date: [July 29, 2019, 7:31pm UTC](https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751/3 "2019-07-29T19:31:50Z")

</div>

This worked. Looks like we needed to specify which fields we needed: [How to query elasticsearch and take some fields from old data](https://discuss.elastic.co/t/how-to-query-elasticsearch-and-take-some-fields-from-old-data/75300/3)

---

<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, 2019, 7:31pm UTC](https://discuss.elastic.co/t/retrieve-multiple-documents-in-elasticsearch-filter/192751/4 "2019-08-26T19:31:52Z")

</div>

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