Disk usage: tags vs fields

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!

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

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

and

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

??

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)?

the tags example will be more efficient

2 Likes

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