# How exactly Elastic search stores the data?

**URL:** <https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082>\
**Category:** Elasticsearch\
**Created:** [October 24, 2013, 5:51am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082 "2013-10-24T05:51:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stalin3443](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@stalin3443](https://discuss.elastic.co/u/stalin3443)\
**Post date:** [October 24, 2013, 5:51am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082/1 "2013-10-24T05:51:43Z")

</div>

Hi All,

I'm newbie to Elastic search from RDBMS background.

In Relational databases, the indexing part stores only indexed column data,  
and physical address of the exact block on the disk.

while coming to ES, if i have indexed MongoDB data using ES, What exactly  
ES will store ?

does it store only few indexed columns ? or does it store entire data ?

please do the needful ..

Thanks,  
Stalin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 24, 2013, 6:13am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082/2 "2013-10-24T06:13:50Z")

</div>

Everything is stored in a Lucene index, with each shard being its own  
index. Lucene indices are append-only segments that are constantly created  
and merged.

By default, each field is indexed in elasticsearch, but this behavior can  
be changed via the mapping. You can index every field and you also can  
index no fields (with only a few select fields being explicitly index such  
as the id and type).

Ivan

On Wed, Oct 23, 2013 at 10:51 PM, [stalin3443@gmail.com](mailto:stalin3443@gmail.com) wrote:

> Hi All,
> 
> I'm newbie to Elastic search from RDBMS background.
> 
> In Relational databases, the indexing part stores only indexed column  
> data, and physical address of the exact block on the disk.
> 
> while coming to ES, if i have indexed MongoDB data using ES, What exactly  
> ES will store ?
> 
> does it store only few indexed columns ? or does it store entire data ?
> 
> please do the needful ..
> 
> Thanks,  
> Stalin
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![stalin3443](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@stalin3443](https://discuss.elastic.co/u/stalin3443)\
**Post date:** [October 24, 2013, 6:31am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082/3 "2013-10-24T06:31:58Z")

</div>

Thanks Ivan for your quick response ..

that means i can customize in such a way that, i can have only index  
columns in ES, rest of the data in another Data store, which will be  
pointed from ES.

lets assume, if i have my data in MongoDB, i have indexed the Data using ES  
with Default indexing, now i will have entire data in ES.

even if i drop all the data from MongoDb, still i can have all the data in  
ES.

correct me if i am wrong ?

Thanks,  
Stalin

On Thursday, October 24, 2013 11:43:50 AM UTC+5:30, Ivan Brusic wrote:

> Everything is stored in a Lucene index, with each shard being its own  
> index. Lucene indices are append-only segments that are constantly created  
> and merged.
> 
> By default, each field is indexed in elasticsearch, but this behavior can  
> be changed via the mapping. You can index every field and you also can  
> index no fields (with only a few select fields being explicitly index such  
> as the id and type).
> 
> Ivan
> 
> On Wed, Oct 23, 2013 at 10:51 PM, \<[stali...@gmail.com](mailto:stali...@gmail.com) \<javascript:\>\>wrote:
> 
> > Hi All,
> > 
> > I'm newbie to Elastic search from RDBMS background.
> > 
> > In Relational databases, the indexing part stores only indexed column  
> > data, and physical address of the exact block on the disk.
> > 
> > while coming to ES, if i have indexed MongoDB data using ES, What  
> > exactly ES will store ?
> > 
> > does it store only few indexed columns ? or does it store entire data ?
> > 
> > please do the needful ..
> > 
> > Thanks,  
> > Stalin
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 24, 2013, 6:48am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082/4 "2013-10-24T06:48:07Z")

</div>

Lucene has two concepts: indexing and storing. An indexed field means that  
is it is searchable using queries and filters. A stored field is one that  
is returned in the data. A field can be either, both or neither (which does  
not make much sense, but is possible). The term indexing can take on a few  
meanings, but in general indexing a document means storing the document and  
indexing a few/all fields.

Elasticsearch is very customizable. By default, each field is indexed, but  
not stored (retrievable), however the entire document is stored as-is (as  
compressed JSON). So you can store your data without actually "indexing"  
any fields. Play around with the examples on the readme (  
[GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch)) and try creating your own  
mapping.

Ivan

On Wed, Oct 23, 2013 at 11:31 PM, [stalin3443@gmail.com](mailto:stalin3443@gmail.com) wrote:

> Thanks Ivan for your quick response ..
> 
> that means i can customize in such a way that, i can have only index  
> columns in ES, rest of the data in another Data store, which will be  
> pointed from ES.
> 
> lets assume, if i have my data in MongoDB, i have indexed the Data using  
> ES with Default indexing, now i will have entire data in ES.
> 
> even if i drop all the data from MongoDb, still i can have all the data in  
> ES.
> 
> correct me if i am wrong ?
> 
> Thanks,  
> Stalin
> 
> On Thursday, October 24, 2013 11:43:50 AM UTC+5:30, Ivan Brusic wrote:
> 
> > Everything is stored in a Lucene index, with each shard being its own  
> > index. Lucene indices are append-only segments that are constantly created  
> > and merged.
> > 
> > By default, each field is indexed in elasticsearch, but this behavior can  
> > be changed via the mapping. You can index every field and you also can  
> > index no fields (with only a few select fields being explicitly index such  
> > as the id and type).
> > 
> > Ivan
> > 
> > On Wed, Oct 23, 2013 at 10:51 PM, [stali...@gmail.com](mailto:stali...@gmail.com) wrote:
> > 
> > > Hi All,
> > > 
> > > I'm newbie to Elastic search from RDBMS background.
> > > 
> > > In Relational databases, the indexing part stores only indexed column  
> > > data, and physical address of the exact block on the disk.
> > > 
> > > while coming to ES, if i have indexed MongoDB data using ES, What  
> > > exactly ES will store ?
> > > 
> > > does it store only few indexed columns ? or does it store entire data ?
> > > 
> > > please do the needful ..
> > > 
> > > Thanks,  
> > > Stalin
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:10am UTC](https://discuss.elastic.co/t/how-exactly-elastic-search-stores-the-data/14082/5 "2017-07-06T02:10:54Z")

</div>


