Specifies an expression to evaluate and return in the output.
Specifies an integer with a numeric document position relative to the current document in the output.
Specifies an optional default expression to evaluate if the document position is outside of the implicit $setWindowFields stage window. The implicit window contains all the documents in the partition.
Generated using TypeDoc
Returns the value from an expression applied to a document in a specified position relative to the current document in the $setWindowFields stage partition.
5.0
https://docs.mongodb.com/manual/reference/operator/aggregation/shift/#mongodb-expression-exp.-shift