# Mapper-attachment plugin stores file content

**URL:** <https://discuss.elastic.co/t/mapper-attachment-plugin-stores-file-content/62060>\
**Category:** Elasticsearch\
**Created:** [October 3, 2016, 11:54am UTC](https://discuss.elastic.co/t/mapper-attachment-plugin-stores-file-content/62060 "2016-10-03T11:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu\_Bhat](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Manu\_Bhat](https://discuss.elastic.co/u/Manu_Bhat)\
**Post date:** [October 3, 2016, 11:54am UTC](https://discuss.elastic.co/t/mapper-attachment-plugin-stores-file-content/62060/1 "2016-10-03T11:54:09Z")

</div>

Hi  
I am using elastic search mapper-attachment plugin for searching within attachments.  
I have a question whether this plugin uploads and stores the file content on the elastic node(in memory) ?  
When I hit the search API, I get the encoded document also in the result which tells me that it infact stores the file content.  
If yes, then would it not be a replication of data in the file drive and elastic cluster ? for a large number of files it will be a concern since I would have to spend on memory for and storage both .  
Is there a way I can only store the search terms extracted from the 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:** [October 3, 2016, 12:18pm UTC](https://discuss.elastic.co/t/mapper-attachment-plugin-stores-file-content/62060/2 "2016-10-03T12:18:37Z")

</div>

You can use [source exclude feature](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/mapping-source-field.html#include-exclude) for that.

Note that this plugin is deprecated and replaced by ingest-attachment in 5.0.  
It's removed in 6.0.

---

<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:** [July 5, 2017, 10:15pm UTC](https://discuss.elastic.co/t/mapper-attachment-plugin-stores-file-content/62060/3 "2017-07-05T22:15:27Z")

</div>


