阅读背景:

在mongo db中检索下N条记录

来源:互联网 

I need a scheduler job which will execute every 5 mins and process next 100 records from a mongodb collection. It should start from the document which was inserted first. So, in the first run, i can sort the data in ascending order and get the first 100 documents. But for the consecutive runs, how can i retrieve the next 100 records giving the last processed document's object id? (i'm not sure how to use the object id here as it is a generating string with different parameters... i don't have any other id defined.)I need a scheduler job which will execute every




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: