# Question about compression of field with same value for every document

**URL:** <https://discuss.elastic.co/t/question-about-compression-of-field-with-same-value-for-every-document/187680>\
**Category:** Elasticsearch\
**Created:** [June 26, 2019, 9:09pm UTC](https://discuss.elastic.co/t/question-about-compression-of-field-with-same-value-for-every-document/187680 "2019-06-26T21:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sm3388](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sm3388](https://discuss.elastic.co/u/sm3388)\
**Post date:** [June 26, 2019, 9:09pm UTC](https://discuss.elastic.co/t/question-about-compression-of-field-with-same-value-for-every-document/187680/1 "2019-06-26T21:09:57Z")

</div>

I have a field that is common to all of my indices. The field always has a value that is a complex object that itself has fields on it that are string arrays:

```auto
commonField: {
    a: ['a', 'b', 'c'],
    b: ['a', 'b']
    ...
}

```

For some of my indices (the largest ones in fact), the value for commonField will be the same for every document in that index.

My question is does elasticsearch 6 have any smarts that will prevent this value from being redundantly stored on disk if it is the same for every document in the index? Is there anything I can do in this case to ensure that this value is compressed so that it is only on disk once, but still behaves like a normal field?

Thanks

---

<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 24, 2019, 9:10pm UTC](https://discuss.elastic.co/t/question-about-compression-of-field-with-same-value-for-every-document/187680/2 "2019-07-24T21:10:03Z")

</div>

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