apiargs-MongoDBCollection-method-aggregate-option.yaml 2.45 KB
Newer Older
1 2 3 4
arg_name: option
name: allowDiskUse
type: boolean
description: |
5
  Enables writing to temporary files. When set to ``true``, aggregation stages
6 7
  can write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. The
  default is ``false``.
8
interface: phpmethod
9
operation: ~
10 11 12 13 14 15
optional: true
---
arg_name: option
name: batchSize
type: integer
description: |
16 17 18 19 20 21 22 23
  Specifies the initial batch size for the cursor. A batchSize of ``0`` means an
  empty first batch and is useful for quickly returning a cursor or failure
  message without doing significant server-side work.

  .. note::

     This is not supported for inline aggregation results (i.e. ``useCursor``
     option is ``false`` or the server version is < 2.6).
24
interface: phpmethod
25
operation: ~
26 27 28
optional: true
---
source:
29
  file: apiargs-MongoDBCollection-common-option.yaml
30
  ref: bypassDocumentValidation
31
post: |
32
  This only applies when using the :ref:`$out <agg-out>` stage.
33 34 35

  Document validation requires MongoDB 3.2 or later: if you are using an earlier
  version of MongoDB, this option will be ignored.
36
---
37 38 39 40 41 42 43 44 45 46 47 48
arg_name: option
name: hint
type: string|array|object
description: |
  The index to use. Specify either the index name as a string or the index key
  pattern as a document. If specified, then the query system will only consider
  plans using the hinted index.

  .. versionadded:: 1.3
interface: phpmethod
operation: ~
optional: true
49
---
50 51
source:
  file: apiargs-common-option.yaml
52
  ref: maxTimeMS
53 54
---
source:
55
  file: apiargs-MongoDBCollection-common-option.yaml
56
  ref: readConcern
57 58
---
source:
59
  file: apiargs-MongoDBCollection-common-option.yaml
60
  ref: readPreference
61 62
---
source:
63
  file: apiargs-MongoDBCollection-common-option.yaml
64
  ref: typeMap
65
---
66
arg_name: option
67 68 69
name: useCursor
type: boolean
description: |
70 71
  Indicates whether the command will request that the server provide results
  using a cursor. The default is ``true``.
72

73 74
  For MongoDB version 2.6 or later, ``useCursor`` allows users to turn off
  cursors if necessary to aid in replica set or shard cluster upgrades.
75

76 77
  ``useCursor`` is ignored for MongoDB versions prior to 2.6 as aggregation
  cursors are not available.
78
interface: phpmethod
79
operation: ~
80
optional: true
81 82 83 84 85
---
source:
  file: apiargs-MongoDBCollection-common-option.yaml
  ref: writeConcern
post: |
86
  This only applies when the :ref:`$out <agg-out>` stage is specified.
87 88 89

  This is not supported for server versions prior to 3.4 and will result in an
  exception at execution time if used.
90
...