allowDiskUse property

bool allowDiskUse
final

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)

Implementation

final bool allowDiskUse;