Final Exam Question 4 - cannot nest $facet stage as a sub-pipeline

Q1. I am assuming that this piece of code, is the code we are talking about, and the question is asking about whether a $facet with a $facet is valid?

facet_3: [
{
$facet: {
facet_3_1: [{ bucketAuto: { groupBy: "_id", buckets: 2 } }]
}
}
]

Or have I read the question wrong.

Q2. a $multiply expression takes a document as input, not an array.

Ahhhh - It’s not talking about the arguments, it’s talking about the manner in which the arguments are passed to the $multiply.

Hi,

Q1. You are right.
Q2. Again, you are right. You can pass multiple expressions to $multiply. Would you pass those expressions as an array of expressions or as a document including those expressions?

José Carlos