Skip to content

Commit b19aa23

Browse files
committed
docs(query+aggregate): add more detail re: maxTimeMS
Fix #4066
1 parent ee6433b commit b19aa23

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

lib/aggregate.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,10 @@ Aggregate.prototype.allowDiskUse = function(value) {
554554
* var agg = Model.aggregate(..).option({ allowDiskUse: true }); // Set the `allowDiskUse` option
555555
* agg.options; // `{ allowDiskUse: true }`
556556
*
557-
* @param {Object} value keys to merge into current options
557+
* @param {Object} options keys to merge into current options
558+
* @param [options.maxTimeMS] number limits the time this aggregation will run, see [MongoDB docs on `maxTimeMS`](https://docs.mongodb.com/manual/reference/operator/meta/maxTimeMS/)
559+
* @param [options.allowDiskUse] boolean if true, the MongoDB server will use the hard drive to store data during this aggregation
560+
* @param [options.collation] object see [`Aggregate.prototype.collation()`](./docs/api.html#aggregate_Aggregate-collation)
558561
* @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/
559562
* @return {Aggregate} this
560563
* @api public
@@ -621,7 +624,6 @@ Aggregate.prototype.addCursorFlag = function(flag, value) {
621624
* Model.aggregate(..).collation({ locale: 'en_US', strength: 1 }).exec();
622625
*
623626
* @param {Object} collation options
624-
* @param {Boolean} value
625627
* @see mongodb http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#aggregate
626628
*/
627629

lib/query.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,9 @@ Query.prototype.read = function read(pref, tags) {
10091009
* The following options are only for `find()`, `findOne()`, `findById()`, and `findOneAndUpdate()`:
10101010
* - [lean](./api.html#query_Query-lean)
10111011
*
1012+
* The following options are only for all operations **except** `update()`, `updateOne()`, `updateMany()`, `remove()`, `deleteOne()`, and `deleteMany()`:
1013+
* - [maxTimeMS](https://docs.mongodb.com/manual/reference/operator/meta/maxTimeMS/)
1014+
*
10121015
* The following options are for all operations:
10131016
* - [collation](https://docs.mongodb.com/manual/reference/collation/)
10141017
*

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)