From e2f590e0b4d085ae4e2f53f11da642b6b4ec0fcf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 17 Oct 2015 20:12:51 -0400 Subject: [PATCH] only return id --- src/database/mongo/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo/main.js b/src/database/mongo/main.js index 045bc2c5bc..f09f13f173 100644 --- a/src/database/mongo/main.js +++ b/src/database/mongo/main.js @@ -53,7 +53,7 @@ module.exports = function(db, module) { } } - db.collection('search' + key).find(searchQuery, {limit: limit}).toArray(function(err, results) { + db.collection('search' + key).find(searchQuery, {limit: limit, fields:{_id: 0, id: 1}}).toArray(function(err, results) { if (err) { return callback(err); }