apiargs-MongoDBCollection-method-aggregate-option.yaml 2.7 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
arg_name: option
38 39 40 41 42 43 44 45 46 47 48 49
name: comment
type: string
description: |
  Users can specify an arbitrary string to help trace the operation through the
  database profiler, currentOp, and logs.

  .. versionadded:: 1.3
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
50 51 52 53 54 55 56 57 58 59 60
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
61
---
62 63
source:
  file: apiargs-common-option.yaml
64
  ref: maxTimeMS
65 66
---
source:
67
  file: apiargs-MongoDBCollection-common-option.yaml
68
  ref: readConcern
69 70
---
source:
71
  file: apiargs-MongoDBCollection-common-option.yaml
72
  ref: readPreference
73 74
---
source:
75
  file: apiargs-MongoDBCollection-common-option.yaml
76
  ref: typeMap
77
---
78
arg_name: option
79 80 81
name: useCursor
type: boolean
description: |
82 83
  Indicates whether the command will request that the server provide results
  using a cursor. The default is ``true``.
84

85 86
  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.
87

88 89
  ``useCursor`` is ignored for MongoDB versions prior to 2.6 as aggregation
  cursors are not available.
90
interface: phpmethod
91
operation: ~
92
optional: true
93 94 95 96 97
---
source:
  file: apiargs-MongoDBCollection-common-option.yaml
  ref: writeConcern
post: |
98
  This only applies when the :ref:`$out <agg-out>` stage is specified.
99 100 101

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