We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7475976 commit 49dbde5Copy full SHA for 49dbde5
models/Users.js
@@ -59,8 +59,7 @@ var Schema = db.Schema(schemaObject);
59
// Schema.index({'tags': 'text'});
60
61
Schema.statics.search = function(string) {
62
- return this.find({$text: {$search: string}}, { score : { $meta: "textScore" } })
63
- .sort({ score : { $meta : 'textScore' } });
+ return this.find({$text: {$search: string}});
64
};
65
66
// assign a function to the "methods" object of our Schema
0 commit comments