# Want to store data (even binary) efficiently in Elasticsearch?

**URL:** <https://discuss.elastic.co/t/want-to-store-data-even-binary-efficiently-in-elasticsearch/108846>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 9:18am UTC](https://discuss.elastic.co/t/want-to-store-data-even-binary-efficiently-in-elasticsearch/108846 "2017-11-23T09:18:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Attila\_Nagy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/attila_nagy/32/46906_2.png) [@Attila\_Nagy](https://discuss.elastic.co/u/Attila_Nagy)\
**Post date:** [November 23, 2017, 9:18am UTC](https://discuss.elastic.co/t/want-to-store-data-even-binary-efficiently-in-elasticsearch/108846/1 "2017-11-23T09:18:27Z")

</div>

If you want to store data in the most efficient and compact way in Elasticsearch, you should exclude those fields which contain them from source:  
[https://www.elastic.co/guide/en/elasticsearch/reference/5.5/mapping-source-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/mapping-source-field.html)  
The problem is currently you can't get your data back with the doc APIs, only with search.

I wonder how many think that using doc values for storing and getting data (in native format, meaning: in the most compact way) is a worthy addition to Elasticsearch.  
If you would like to have this, please place a thumbs up on this issue (also, there are some simple examples on how much space can be saved by using it):

> <https://github.com/elastic/elasticsearch/issues/27374>

  
and share your thoughts about it.  
Hopefully this will help to form an RFC on how should be this done nicely.

---

<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:** [December 21, 2017, 9:18am UTC](https://discuss.elastic.co/t/want-to-store-data-even-binary-efficiently-in-elasticsearch/108846/2 "2017-12-21T09:18:56Z")

</div>

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