# Storing Data in ElasticSearch

**URL:** <https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904>\
**Category:** Elasticsearch\
**Created:** [January 24, 2018, 5:19pm UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904 "2018-01-24T17:19:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moriol](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@moriol](https://discuss.elastic.co/u/moriol)\
**Post date:** [January 24, 2018, 5:19pm UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904/1 "2018-01-24T17:19:48Z")

</div>

I have noticed by default all my data is stored under \_source in ElasticSearch.  
I have some questions, I would like to clarify as the article below is not clear to me:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html)

1. In Kibana I see that for a particular index, I have all my fields available as expected, I can search for them and I see they show up as fields under Management\_\>Index Patterns-\>Index.  
But when I go to Discover tab and select a particular message, and select the JSON output, I see that all my data is stored under \_source, and not under fields. Does this mean my data is stored only in \_source and the fields are not stored as actual fields?

2. In JSON output, when I am looking at a message from a particular index that contains fields that are dates, these seem to be added to fields as well as \_source. Is this behavior expected, that all date fields are stored as fields automatically?

3)If I remove \_source from my index, will all my data be stored under fields automatically?

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [January 26, 2018, 10:32am UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904/2 "2018-01-26T10:32:09Z")

</div>

> [@moriol](#):
>
> In Kibana I see that for a particular index, I have all my fields available as expected, I can search for them and I see they show up as fields under Management\_\>Index Patterns-\>Index.
> 
> But when I go to Discover tab and select a particular message, and select the JSON output, I see that all my data is stored under \_source, and not under fields. Does this mean my data is stored only in \_source and the fields are not stored as actual fields?

`_source` contains the source document that you sent to elasticsearch. We `store` that as a whole for various reasons. I recommend doing this!!!! (you can opt out but that has a bunch of implications). Now you can also mark certain fields as `stored` for instance if you don't request `_source` as part of your result that might reduce the amout of data that we need to fetch for you.  
I think for dates you see it markes as `stored` since it's organized as a doc-value (column oriented storage) so no, it's not stored by default. I think it's just a naming issue and you are fine. we store all your data by default. to mark a field `stored` is an optimization for certain cases.

hope that helps

---

<div class="post-metadata">

**Author:** ![moriol](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@moriol](https://discuss.elastic.co/u/moriol)\
**Post date:** [January 30, 2018, 1:02pm UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904/3 "2018-01-30T13:02:05Z")

</div>

Thanks for the info, very helpful. So the "available fields" I see in Kibana are actually based on what is in \_source, that is good to know. I will check out which fields are worth storing as "stored", for optimization reasons.

---

<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 27, 2018, 1:02pm UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904/4 "2018-02-27T13:02:16Z")

</div>

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