# Store binary files in elastic search

**URL:** <https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805>\
**Category:** Elasticsearch\
**Created:** [January 31, 2022, 8:02am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805 "2022-01-31T08:02:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arpita11](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Arpita11](https://discuss.elastic.co/u/Arpita11)\
**Post date:** [January 31, 2022, 8:02am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/1 "2022-01-31T08:02:02Z")

</div>

For my project, we are storing the data in Elasticsearch.  
I have new requirement regarding documents (i.e. the actual binaries):

1. Store documents and be able to search the text within the document binary.
2. Allow the user to download the document after I display the search results.

I came across few discussions mentioning Elasticsearch is not designed to store big BLOBs.  
Need suggestion if I should store data in Elasticsearch or a file system.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 31, 2022, 8:26am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/2 "2022-01-31T08:26:18Z")

</div>

Welcome to our community! 😃

If you decode the blob's then index them Elasticsearch can search in them. Otherwise it's not going to be worth it. You would then store the metadata in there to search on that.

---

<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:** [January 31, 2022, 8:32am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/3 "2022-01-31T08:32:00Z")

</div>

Take a look at FSCrawler project as well. It could help you.

---

<div class="post-metadata">

**Author:** ![Arpita11](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Arpita11](https://discuss.elastic.co/u/Arpita11)\
**Post date:** [January 31, 2022, 8:33am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/4 "2022-01-31T08:33:00Z")

</div>

Thank you for the quick response.

Can we possibly run into performance issues later due to big file sizes?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 31, 2022, 8:39am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/5 "2022-01-31T08:39:04Z")

</div>

How big?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 31, 2022, 8:45am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/6 "2022-01-31T08:45:56Z")

</div>

Storing large binary objects in Elasticsearch is not recommended. Instead store the extracted and indexed text together with a location of the binary object, e.g. on S3, so you can retrieve it from there instead when needed.

---

<div class="post-metadata">

**Author:** ![Arpita11](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Arpita11](https://discuss.elastic.co/u/Arpita11)\
**Post date:** [January 31, 2022, 8:48am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/7 "2022-01-31T08:48:07Z")

</div>

This requirement is to build up a knowledge exchange site with images, word, pdf, etc. Number of files will increase over time. Upto 10MB is expected file size as of now.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 31, 2022, 9:00am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/8 "2022-01-31T09:00:51Z")

</div>

Maybe you should look at [Elastic Workplace Search | Elastic](https://www.elastic.co/workplace-search/) then.

---

<div class="post-metadata">

**Author:** ![Arpita11](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Arpita11](https://discuss.elastic.co/u/Arpita11)\
**Post date:** [January 31, 2022, 11:36am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/9 "2022-01-31T11:36:19Z")

</div>

My application is on .Net Core.  
I am also going through this blog for integration using Nest - [The Future of Attachments for Elasticsearch and .NET | Elastic Blog](https://www.elastic.co/blog/the-future-of-attachments-for-elasticsearch-and-dotnet).  
This is based on usage of "ingest attachment processor plugin".

Could you please suggest if this approach will scale with the increase in number of attachments.

---

<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:** [February 28, 2022, 11:37am UTC](https://discuss.elastic.co/t/store-binary-files-in-elastic-search/295805/10 "2022-02-28T11:37:12Z")

</div>

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