Reputation: 20680
In mongodb shell, I would like to retrieve the next elements for a query.
cursor = db.collection.find({ok: true});
Now, I see 20 results.
I would like to see the next results.
Upvotes: 4
Views: 990
Reputation: 1803
You can also just skip the first set of results:
db.collection.find({ok: true}).skip(20)
This is useful whatever the shellBatchSize setting.
Upvotes: 1
Reputation: 147314
Reference: mongodb.org
After the find, just run: it
Note you can increase the batch size, e.g.
DBQuery.shellBatchSize = 100
Upvotes: 8