How to do operations to a document other than the current one in MongoDB's setWindowFields
I have a MongoDB collection like this: [ { "_id": 1, "price": 1 }, { "_id": 2, "price": 2 }, { "_id": 3, "price": 3 }, { "_id": 4, "price": 4 }, { "_id": 5, "price": 5 }, { "_id":…