# Source and Store Level Compression

**URL:** <https://discuss.elastic.co/t/source-and-store-level-compression/11115>\
**Category:** Elasticsearch\
**Created:** [March 12, 2013, 5:32pm UTC](https://discuss.elastic.co/t/source-and-store-level-compression/11115 "2013-03-12T17:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://discuss.elastic.co/u/Mike)\
**Post date:** [March 12, 2013, 5:32pm UTC](https://discuss.elastic.co/t/source-and-store-level-compression/11115/1 "2013-03-12T17:32:43Z")

</div>

I'm using Elasticsearch 19.8, and currently I have "\_source" : { "compress"  
: "true" } in my index mapping. My average document size is \< 1 KB, but I  
have millions of them making my indices gigabytes in size.

The documentation says that both source and store compression is enabled in  
v.90+  
[http://www.elasticsearch.org/guide/reference/index-modules/store.html](http://www.elasticsearch.org/guide/reference/index-modules/store.html)  
[http://www.elasticsearch.org/guide/reference/mapping/source-field.html](http://www.elasticsearch.org/guide/reference/mapping/source-field.html)

Is it then recommended to set index.store.compress.stored : true for  
versions .19.5 - .20 that have this option?  
If I set store compression to true, does it then make setting source  
compression unneeded? Should I set source=false and store=true instead or  
both to true?

--  
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:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [March 13, 2013, 7:18am UTC](https://discuss.elastic.co/t/source-and-store-level-compression/11115/2 "2013-03-13T07:18:56Z")

</div>

Hello Mike,

If you have small documents with 0.19.8, I think you should use store-level  
compression only. That will compress your \_source as well, and I don't see  
the point of having both turned on.

From 0.90, Elasticsearch uses a more efficient, Lucene-level field  
compression. For some more details, here's an interesting blog post:  
[http://blog.jpountz.net/post/33247161884/efficient-compressed-stored-fields-with-lucene](http://blog.jpountz.net/post/33247161884/efficient-compressed-stored-fields-with-lucene)

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Tue, Mar 12, 2013 at 7:32 PM, Mike [mnilsson2323@gmail.com](mailto:mnilsson2323@gmail.com) wrote:

> I'm using Elasticsearch 19.8, and currently I have "\_source" : {  
> "compress" : "true" } in my index mapping. My average document size is \< 1  
> KB, but I have millions of them making my indices gigabytes in size.
> 
> The documentation says that both source and store compression is enabled  
> in v.90+  
> [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/store.html)  
> [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/mapping/source-field.html)
> 
> Is it then recommended to set index.store.compress.stored : true for  
> versions .19.5 - .20 that have this option?  
> If I set store compression to true, does it then make setting source  
> compression unneeded? Should I set source=false and store=true instead or  
> both to true?
> 
> --  
> 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:46am UTC](https://discuss.elastic.co/t/source-and-store-level-compression/11115/3 "2017-07-06T02:46:52Z")

</div>


