I’m certain I’m missing something obvious, but I can’t get set
to work in a pipeline query:
const pipeline = [
{
project: {
name: 1,
audit: 1,
totalScore: "unset",
},
},
{ set: { totalScore: "custom_value" } },
{ limit: maxFind },
];
I simply receive Invalid parameter for query: set
. FYI, I did get addFields
to work, but still curious.