Use allowDiskUse to allow MongoDB to use temporary files on disk to
store data exceeding the 100 megabyte memory limit while processing a
non-indexed (“blocking”) sort operation. If MongoDB requires using more
than 100 megabytes of memory for a blocking sort operation,
MongoDB returns an error unless the query specifies allowDiskUse.
See Sort and Index Use for more information on blocking sort operations.
allowDiskUse has no effect if MongoDB can satisfy the specified sort
using an index, or if the blocking sort requires less than 100 megabytes
of memory.
For more complete documentation on allowDiskUse,
see cursor.allowDiskUse().
For more information on memory restrictions for large blocking sorts,
see Sort and Index Use.
@Since(4.4)
For queries against a sharded collection, allows the command
(or subsequent getMore commands) to return partial results,
rather than an error, if one or more queried shards are unavailable.
Starting in MongoDB 4.4, if find (or subsequent getMore commands)
returns partial results due to the unavailability of the queried shard(s),
the output includes a partialResultsReturned indicator field.
If the queried shards are initially available for the find command but
one or more shards become unavailable in subsequent getMore commands,
only the getMore commands run when a queried shard or shards are
unavailable include the partialResultsReturned flag in the output.
Use in conjunction with the tailable option to block a getMore command
on the cursor temporarily if at the end of data rather than returning
no data. After a timeout period, find returns as normal.
The number of documents to return in the first batch. Defaults to 101.
A batchSize of 0 means that the cursor will be established,
but no documents will be returned in the first batch.
Unlike the previous wire protocol version, a batchSize of 1 for the find
command does not close the cursor
Specifies the collation to use for the operation.
Collation allows users to specify language-specific rules for string
comparison, such as rules for lettercase and accent marks.
See Collation document
@Since(3.4)
The exclusive upper bound for a specific index. See cursor.max()
for details.
Starting in MongoDB 4.2, to use the max field, the command must also
use hint unless the specified filter is an equality condition on the
_id field { _id:
The cumulative time limit in milliseconds for processing operations on
the cursor. MongoDB aborts the operation at the earliest following
interrupt point.
Tip
When specifying linearizable read concern, always use maxTimeMS in case
a majority of data bearing members are unavailable. maxTimeMS ensures
that the operation does not block indefinitely and instead ensures that
the operation returns an error if the read concern cannot be fulfilled.
The inclusive lower bound for a specific index. See cursor.min()
for details.
Starting in MongoDB 4.2, to use the min field, the command must also
use hint unless the specified filter is an equality condition on the
_id field { _id:
If true, returns only the index keys in the resulting documents.
Default value is false. If returnKey is true and the find command does
not use an index, the returned documents will be empty.