full text search using reds, issue #142

This commit is contained in:
Baris Soner Usakli
2013-08-03 20:54:16 -04:00
parent 797d05a84a
commit d6b9a2799b
10 changed files with 179 additions and 42 deletions

View File

@@ -382,6 +382,18 @@ var express = require('express'),
res.redirect(global.nconf.get('relative_path') + '/404');
}
});
app.get('/search', function(req, res) {
app.build_header({ req: req, res: res }, function(err, header) {
res.send(header + app.create_route("search", null, "search") + templates['footer']);
});
});
app.get('/search/:term', function(req, res) {
app.build_header({ req: req, res: res }, function(err, header) {
res.send(header + app.create_route("search/"+req.params.term, null, "search") + templates['footer']);
});
});
});
}(WebServer));