- 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.
find
andaggregate
, to return subsequent batches of documents currently pointed to by the cursor.The
getMore
command has the following form:The command accepts the following fields:
Field Type Description getMore
long The cursor id. collection
string The name of the collection over which the cursor is operating. batchSize
positive integer Optional. The number of documents to return in the batch. maxTimeMS
positive integer Optional. The maximum time period in milliseconds the
getMore()
operation will block waiting for new data to be inserted into the capped collection.Requires that the cursor on which this
getMore()
is acting is anawaitData
cursor. See theawaitData
parameter forfind()
.
See also