Calculate skip value for given record for sorted paging
This is called “forward paging” which is a concept you can use to “efficiently page” through results in a “forward” direction when using “sorted” results. JavaScript logic included (because it works in the shell), but not hard to translate. The concept in general: { “_id”: 1, “a”: 3 }, { “_id”: 2, “a”: 3 }, … Read more