Suposse tou have the following collection with only 2 documents:
If you run an aggregation query and use { $unwind: "$traits" } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?
I agree with the answer is 4. Each document in the collection will be duplicated for every element in the 'traits' array, resulting in 4 documents in total.
I'm not sure, but I think the answer is 2. The $unwind stage will create a document for each element in the 'traits' array, resulting in a total of 2 documents.
I disagree, I believe the answer is 4. The $unwind stage will create a document for each element in the 'traits' array but it will maintain the original document as well.
Giovanna
7 months agoVenita
7 months agoLuis
8 months agoMatthew
8 months agoNidia
9 months agoAdolph
9 months agoNidia
9 months agoAdolph
9 months ago