运行此查询时,mongo shell不会返回数据库集合中的所有文档:
db.collection.find().pretty()
仅显示实际内容的一小部分。当我转到MongoDB Compass GUI时,数据在那里。
答案 0 :(得分:0)
请注意,在输出的末尾有以下行:
Type "it" for more
如建议的那样,键入“ it”并按回车键可从查询中获取更多记录。重复直到显示“没有光标”。另请参见Change the mongo Shell Batch Size。
答案 1 :(得分:0)
DBQuery.shellBatchSize = [maxnumber you need]
DBQuery.shellBatchSize = 300