Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inside mongodb shell how to retrieve next results?

Tags:

mongodb

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.

like image 624
viebel Avatar asked Jan 17 '23 10:01

viebel


1 Answers

Reference: mongodb.org

After the find, just run: it

Note you can increase the batch size, e.g.

DBQuery.shellBatchSize = 100
like image 158
AdaTheDev Avatar answered Jan 25 '23 03:01

AdaTheDev