diff --git a/src/database/mongo.js b/src/database/mongo.js index 699c46af6f..9005c86095 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -69,22 +69,21 @@ // module.searchIndex = function(key, content, id) { - + // REQUIRES MONGO 2.4 db.collection('search').update({key:key, content:content, _id:id}, {upsert:true, w: 1}, function(err, result) { }); } module.search = function(key, term, callback) { + // REQUIRES MONGO 2.4 db.command({text:"search" , search: term }, function(err, result) { callback(err, result) }); - /*db.runCommand("text", { search: term }, function(err, result) { - callback(err, result); - });*/ } module.searchRemove = function(key, id) { + // REQUIRES MONGO 2.4 db.collection('search').remove({_id:id}, function(err, result) { callback(err, result); });