I have a document that can be flagged with different tags. These tags are limited in number, meaning that a document can have at most 9 tags. Over those tags, I run queries like: Give me all documents that contains exactly the given tags. The question is, which of the two following approaches would be more performant in terms of index size and speed:
Array containing the code of the tag (a list of integer) and run the queries like: