M201 video 2.8 multikey array v doc

in this video there is focus on stock; in one scenario it is a document, and then in another scenario is is an array.

while I get that multikey is for arrays - - - there is no higher level discussion of whether there are other benefits of having stock (or any multi field data set) be a doc versus it being an array…

and while it’s not the intent of this video to discuss higher level strategies am just wondering if there is any clear pros/cons on this choice?

Hi @James_58604,

In the video, the stock field is an array of documents, so we can create a multikey index on either scalar values or nested documents.
The document structure referred in the video is as follows:

To clarify, you can create multikey index on the complete stock field or stock.quantity field.
You can also refer to the documentation for more details: https://docs.mongodb.com/manual/core/index-multikey/

Please let me know, if you have any questions.