extended search

This commit is contained in:
2019-07-19 12:52:43 +02:00
parent 2f07441fb7
commit 70befa7c4d
5 changed files with 302 additions and 274 deletions
+3 -1
View File
@@ -57,7 +57,9 @@ const dbs = {
* Get a particular message
*/
get: function(req, res) {
model.Messages.find({$text: {$search: req.params.phrase}})
model.Messages.find(
{$text: {$search: req.params.phrase}})
.sort({tag:1, user:1, message:1, subject:1})
.exec().then(results => {
//selects id from message:
var parsed = [];