Joseph_D
(Joseph D)
3
Hey @aneroid, appreciate your response. Not exactly the same question.
In SO:
Any suggestions on the best way to do two-level partition aside from using $setWindowFields ?
In here:
Do I need to combine $setWindowFields with other operators?
You see when using $group, you need to do use $first accumulator. It’s a bit “ugly” especially when the document has a lot of fields that should be retained for the next stage.
$setWindowFields on the other hand retains the rest of the document fields for the next stage.
Thus, I was thinking if it’s possible to do it using two-stage sliding window or any other operators I can combine.
Thanks in advance.