# Ingest-Attachement: How get (or store) properties without getting (storing) source document content

**URL:** <https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796>\
**Category:** Elasticsearch\
**Created:** [December 13, 2018, 6:14pm UTC](https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796 "2018-12-13T18:14:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francillo](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Francillo](https://discuss.elastic.co/u/Francillo)\
**Post date:** [December 13, 2018, 6:14pm UTC](https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796/1 "2018-12-13T18:14:30Z")

</div>

Hi,  
I have to store documents using ingest-attachement.

This works, and I have need some properties (file meta data such as date, filename, and so on ...).  
But I when I run a search query, I don't want the content of the file to be in the response (for network and memory reason), but just meta data properties.  
The use case is:  
I look for documents with keyword, I get the filemetadata of matching files, then, on demand, I get the real content of the file.  
I'm not an ES expert, so, I don't know if the approche is to Index meta data with content BUT withot storing the source content, or if there's a way to query only properties.

Thx for your help!  
Francillo

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 13, 2018, 7:13pm UTC](https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796/2 "2018-12-13T19:13:55Z")

</div>

Take a look at [source filtering](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html). It will allow you to choose what portion of the document to return in search hits.

---

<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:** [December 13, 2018, 10:09pm UTC](https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796/3 "2018-12-13T22:09:08Z")

</div>

You can use a remove processor in your pipeline to remove the original BASE64 field.

---

<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:** [January 10, 2019, 10:09pm UTC](https://discuss.elastic.co/t/ingest-attachement-how-get-or-store-properties-without-getting-storing-source-document-content/160796/4 "2019-01-10T22:09:10Z")

</div>

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