# Don't return whole BASE64 encoded files (ingest plugin)

**URL:** <https://discuss.elastic.co/t/dont-return-whole-base64-encoded-files-ingest-plugin/170949>\
**Category:** Elasticsearch\
**Created:** [March 5, 2019, 4:26pm UTC](https://discuss.elastic.co/t/dont-return-whole-base64-encoded-files-ingest-plugin/170949 "2019-03-05T16:26:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Sanchez\_Sanche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oscar_sanchez_sanche/32/36678_2.png) [@Oscar\_Sanchez\_Sanche](https://discuss.elastic.co/u/Oscar_Sanchez_Sanche)\
**Post date:** [March 5, 2019, 4:26pm UTC](https://discuss.elastic.co/t/dont-return-whole-base64-encoded-files-ingest-plugin/170949/1 "2019-03-05T16:26:40Z")

</div>

Hi,

I've been reading a couple about how the ingest plugin works. So far this works correctly for me when searching for words inside the PDF files, however, I noticed a problem with large files.

Let's say I search for a PDF which originally weights 20mb, if I search for it, it returns the 20mb+ encoded BASE64 data. Unfortunately that becomes a huge problem, I would like ElasticSearch to not do that.

Is there a way to accomplish this?

Thanks!

---

<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:** [March 5, 2019, 4:50pm UTC](https://discuss.elastic.co/t/dont-return-whole-base64-encoded-files-ingest-plugin/170949/2 "2019-03-05T16:50:37Z")

</div>

Use the `remove` processor to remove the BASE64 field.

Or have a look at FSCrawler project which does not send to elasticsearch at all the binary file but only the extracted content.

---

<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:** [April 2, 2019, 4:53pm UTC](https://discuss.elastic.co/t/dont-return-whole-base64-encoded-files-ingest-plugin/170949/3 "2019-04-02T16:53:09Z")

</div>

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