# Index file content in elasticsearch without storing the actual content in base64

**URL:** <https://discuss.elastic.co/t/index-file-content-in-elasticsearch-without-storing-the-actual-content-in-base64/71815>\
**Category:** Elasticsearch\
**Created:** [January 17, 2017, 6:11am UTC](https://discuss.elastic.co/t/index-file-content-in-elasticsearch-without-storing-the-actual-content-in-base64/71815 "2017-01-17T06:11:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umar\_Memon](https://avatars.discourse-cdn.com/v4/letter/u/c68b51/32.png) [@Umar\_Memon](https://discuss.elastic.co/u/Umar_Memon)\
**Post date:** [January 17, 2017, 6:11am UTC](https://discuss.elastic.co/t/index-file-content-in-elasticsearch-without-storing-the-actual-content-in-base64/71815/1 "2017-01-17T06:11:05Z")

</div>

I am using .net Nest libraby, with mapper-attachment. I successfully indexed the file contnet and my documents stored on my machine. But by default elasticsearch index stores the whole file content as base64 encoded. Is there a way or alternative to index the documents store in file system without storing the actual file content in index.  
Also the file content be searchable.  
The file i want to index is already stored on system so i don't want to duplicate the file content for indexing.

---

<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 17, 2017, 7:38am UTC](https://discuss.elastic.co/t/index-file-content-in-elasticsearch-without-storing-the-actual-content-in-base64/71815/2 "2017-01-17T07:38:58Z")

</div>

Upgrade to 5.0 and use ingest-attachment plugin instead so you will have a much better control of all that.

Also read:

> **[The Future of Attachments for Elasticsearch and .NET
	  	 | Elastic](https://www.elastic.co/blog/the-future-of-attachments-for-elasticsearch-and-dotnet)**
>
> For a long time, Elasticsearch has supported the indexing of attachments through the mapper-attachments plugin. Installing this plugin has provided the capability to index Word documents, PDFs as well...

---

<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 14, 2017, 7:39am UTC](https://discuss.elastic.co/t/index-file-content-in-elasticsearch-without-storing-the-actual-content-in-base64/71815/3 "2017-02-14T07:39:05Z")

</div>

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