# How can I download content from Elasticsearch

**URL:** <https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535>\
**Category:** Elasticsearch\
**Created:** [May 10, 2019, 10:29am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535 "2019-05-10T10:29:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smshabab11](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@smshabab11](https://discuss.elastic.co/u/smshabab11)\
**Post date:** [May 10, 2019, 10:29am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/1 "2019-05-10T10:29:26Z")

</div>

I have an UI to upload document which is getting indexed in Elasticsearch 7.0. I want to download the file from elasticsearch after getting indexed by clicking download button .

Need suggestion ASAP.

---

<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:** [May 10, 2019, 12:27pm UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/2 "2019-05-10T12:27:27Z")

</div>

> [@smshabab11](#):
>
> Need suggestion ASAP.

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

> [@smshabab11](#):
>
> I have an UI to upload document which is getting indexed in Elasticsearch 7.0. I want to download the file from elasticsearch after getting indexed by clicking download button .

What kind of "document" do you mean? A JSON document?

> I want to download the file from elasticsearch after getting indexed by clicking download button.

Do you mean a binary file?

---

<div class="post-metadata">

**Author:** ![smshabab11](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@smshabab11](https://discuss.elastic.co/u/smshabab11)\
**Post date:** [May 13, 2019, 6:15am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/3 "2019-05-13T06:15:19Z")

</div>

Thanks for the response............No, it's pdf file

---

<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:** [May 13, 2019, 9:46am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/4 "2019-05-13T09:46:06Z")

</div>

The only way is to store the document as a binary field in BASE64.  
At search time you will need to read that field an decode yourself.

---

<div class="post-metadata">

**Author:** ![smshabab11](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@smshabab11](https://discuss.elastic.co/u/smshabab11)\
**Post date:** [May 14, 2019, 5:37am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/5 "2019-05-14T05:37:31Z")

</div>

I am able to download the file from the UI. Thanks 🙂

---

<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:** [June 11, 2019, 5:37am UTC](https://discuss.elastic.co/t/how-can-i-download-content-from-elasticsearch/180535/6 "2019-06-11T05:37:38Z")

</div>

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