On this page本页内容
The getMore
command has the following form:
The command accepts the following fields:
getMore |
long | The cursor id. |
collection |
string | The name of the collection over which the cursor is operating. |
batchSize |
positive integer | |
maxTimeMS |
non-negative integer |
MongoDB terminates operations that exceed their allotted time limit using the same mechanism as |
comment |
any |
A comment can be any valid BSON type (string, integer, object, array, etc).
|
The command returns a document that contains the cursor information as well as the next batch.
For example, a document similar to the one below may be returned when getMore
is run on a cursor that was originally created by a find
operation on a sharded cluster:
cursor |
Contains the cursor information, including the cursor id as well as the Starting in 4.4, if the cursor from a If the queried shards are initially available for the |
"ok" |
Indicates whether the command has succeeded (1 ) or failed (0 ). |
In addition to the aforementioned getMore
-specific fields, the db.runCommand()
includes the following information for replica sets and sharded clusters:
$clusterTime
operationTime
See db.runCommand() Results for details.
New in version 3.6.版本3.6中的新功能。
If authentication is turned on, you can only issue a getMore
against cursors you created.