Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RoboMongo: Doesn't display all documents

When I open a collection, it only displays the first 50 documents rather then all of them. How do I make it so that RoboMongo display all documents in the collection (preferably automatically)?

robomongo result

like image 278
BenSmith Avatar asked Nov 23 '17 14:11

BenSmith


People also ask

How do you run a query in Robomongo?

The query is run only when you want it run, by clicking the “play” arrow in the toolbar, typing Command/Control-Enter in the text box or pressing F5.

What is MongoDB Robomongo?

Robo 3T (formerly Robomongo)A desktop application embedding the MongoDB shell. A GUI for MongoDB enthusiasts. Purpose: GUI. Maintenance status: Actively Maintained. Minimum MongoDB version: 2.2.


2 Answers

UPDATE 06 december 2019: The initial solution is not working from the v1.3.1 of Robomongo. If you enter 0, Robomongo will throw an error. See the EDIT 1 for new solution.

There is an input at the upper right which gives you the possiblity to change the number of displayed documents, just under the query. Change it to 0 and press Enter. It'll load all documents.

The input buttons

Even if the 50 reappears after, you have all documents displayed.

EDIT 1: The above seems to be fixed in the newer releases (from v1.3.1).

As suggested by @learnsomemore in the comments, you can add DBQuery.shellBatchSize = 500; before your query to change the returned array size.

This was originaly given in a comment by @davidm06 in the GitHub issue "Aggregate only shows 50 results #1157" from the RoboMongo public repository.

like image 97
Paul Rey Avatar answered Oct 18 '22 06:10

Paul Rey


You can also use toArray() at the end to get the whole result at once.

example toArray()

like image 44
Melchia Avatar answered Oct 18 '22 05:10

Melchia