Inside the mongodb shell, how to get the following results?

In the mongodb shell, I would like to get the following items for the request.

cursor = db.collection.find({ok: true}); 

Now I see 20 results.

I would like to see the following results.

+4
source share
2 answers

Link: mongodb.org

After searching, just run: it

Please note that you can increase the batch size, for example

 DBQuery.shellBatchSize = 100 
+8
source

You can also just skip the first result set:

 db.collection.find({ok: true}).skip(20) 

This is useful regardless of the shellBatchSize parameter.

+1
source

Source: https://habr.com/ru/post/1397428/


All Articles