Method: Mongo::Collection::View::Readable#max_scan

Defined in:
lib/mongo/collection/view/readable.rb

#max_scan(value = nil) ⇒ Integer, View

Deprecated.

This option is deprecated as of MongoDB server version 4.0.

Set the max number of documents to scan.

Examples:

Set the max scan value.

view.max_scan(1000)

Parameters:

  • value (Integer) (defaults to: nil)

    The max number to scan.

Returns:

  • (Integer, View)

    The value or a new View.

Since:

  • 2.0.0



441
442
443
# File 'lib/mongo/collection/view/readable.rb', line 441

def max_scan(value = nil)
  configure(:max_scan, value)
end