Skip to content

Commit

Permalink
docs(query+aggregate): add more detail re: maxTimeMS
Browse files Browse the repository at this point in the history
Fix #4066
  • Loading branch information
vkarpov15 committed Jan 20, 2018
1 parent ee6433b commit b19aa23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/aggregate.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,10 @@ Aggregate.prototype.allowDiskUse = function(value) {
* var agg = Model.aggregate(..).option({ allowDiskUse: true }); // Set the `allowDiskUse` option
* agg.options; // `{ allowDiskUse: true }`
*
* @param {Object} value keys to merge into current options
* @param {Object} options keys to merge into current options
* @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/)
* @param [options.allowDiskUse] boolean if true, the MongoDB server will use the hard drive to store data during this aggregation
* @param [options.collation] object see [`Aggregate.prototype.collation()`](./docs/api.html#aggregate_Aggregate-collation)
* @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/
* @return {Aggregate} this
* @api public
Expand Down Expand Up @@ -621,7 +624,6 @@ Aggregate.prototype.addCursorFlag = function(flag, value) {
* Model.aggregate(..).collation({ locale: 'en_US', strength: 1 }).exec();
*
* @param {Object} collation options
* @param {Boolean} value
* @see mongodb http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#aggregate
*/

Expand Down
3 changes: 3 additions & 0 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,9 @@ Query.prototype.read = function read(pref, tags) {
* The following options are only for `find()`, `findOne()`, `findById()`, and `findOneAndUpdate()`:
* - [lean](./api.html#query_Query-lean)
*
* The following options are only for all operations **except** `update()`, `updateOne()`, `updateMany()`, `remove()`, `deleteOne()`, and `deleteMany()`:
* - [maxTimeMS](https://docs.mongodb.com/manual/reference/operator/meta/maxTimeMS/)
*
* The following options are for all operations:
* - [collation](https://docs.mongodb.com/manual/reference/collation/)
*
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b19aa23

Please sign in to comment.