# Disk usage: tags vs fields

**URL:** <https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531>\
**Category:** Elasticsearch\
**Created:** [October 29, 2018, 11:23pm UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531 "2018-10-29T23:23:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [October 29, 2018, 11:23pm UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531/1 "2018-10-29T23:23:40Z")

</div>

Hi!

Is there a significant disk usage difference between keeping some data in an array or in an individual field? The data won't be frequently queried but sometimes may act as a filter. So I'm not concerned about search speed in this case, only if I can spare a couple of GBs per X million documents.

Thank you!

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [November 2, 2018, 2:41pm UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531/2 "2018-11-02T14:41:39Z")

</div>

I'm not entirely sure I understand. Are you asking the difference between:

```auto
{
  "tags": ["foo", "bar"]
}

```

and

```auto
{
  "tag1": "foo",
  "tag2": "bar"
}

```

??

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [November 5, 2018, 8:09am UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531/3 "2018-11-05T08:09:28Z")

</div>

Yes. Currently, I have about 5 values which aren't that important (e.g., I don't use scoring). With around 15.000.000.000 documents would I spare disk space if those were in an array (like the `tags` example)?

---

<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:** [November 5, 2018, 1:48pm UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531/4 "2018-11-05T13:48:09Z")

</div>

the tags example will be more efficient

---

<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 3, 2018, 1:48pm UTC](https://discuss.elastic.co/t/disk-usage-tags-vs-fields/154531/5 "2018-12-03T13:48:15Z")

</div>

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