- Reference >
- Database Commands >
- Query and Write Operation Commands >
- getMore
getMore¶
On this page
Definition¶
-
getMore¶ New in version 3.2.
Use in conjunction with commands that return a cursor, e.g.
findandaggregate, to return subsequent batches of documents currently pointed to by the cursor.The
getMorecommand has the following form:The command accepts the following fields:
Field Type Description getMorelong The cursor id. collectionstring The name of the collection over which the cursor is operating. batchSizepositive integer Optional. The number of documents to return in the batch. maxTimeMSnon-negative integer Optional. Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out. A value of
0explicitly specifies the default unbounded behavior.MongoDB terminates operations that exceed their allotted time limit using the same mechanism as
db.killOp(). MongoDB only terminates an operation at one of its designated interrupt points.
See also