Changes
This commit is contained in:
26
node_modules/mongoose/lib/aggregate.js
generated
vendored
26
node_modules/mongoose/lib/aggregate.js
generated
vendored
@@ -909,6 +909,32 @@ Aggregate.prototype.facet = function(options) {
|
||||
return this.append({ $facet: options });
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper for [Atlas Text Search](https://docs.atlas.mongodb.com/reference/atlas-search/tutorial/)'s
|
||||
* `$search` stage.
|
||||
*
|
||||
* ####Example:
|
||||
*
|
||||
* Model.aggregate().
|
||||
* search({
|
||||
* text: {
|
||||
* query: 'baseball',
|
||||
* path: 'plot'
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // Output: [{ plot: '...', title: '...' }]
|
||||
*
|
||||
* @param {Object} $search options
|
||||
* @return {Aggregate} this
|
||||
* @see $search https://docs.atlas.mongodb.com/reference/atlas-search/tutorial/
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Aggregate.prototype.search = function(options) {
|
||||
return this.append({ $search: options });
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the current pipeline
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user