Permalink
Browse files

updated examples

  • Loading branch information...
1 parent 9b4e493 commit 67eb434200db84fb663a6f02a7841ba264c32bac @tj committed Jul 28, 2011
Showing with 3 additions and 4 deletions.
  1. +1 −1 examples/simple.js
  2. +1 −1 examples/web-realtime.js
  3. +1 −1 examples/web-search.js
  4. +0 −1 lib/reds.js
View
@@ -31,7 +31,7 @@ strs.forEach(function(str, i){
// query
-search.query(query, function(err, ids){
+search.query(query).end(function(err, ids){
if (err) throw err;
var res = ids.map(function(i){ return strs[i]; });
console.log();
View
@@ -22,7 +22,7 @@ http.createServer(function(req, res){
, query = qs.parse(url.query);
if ('/search' == url.pathname) {
- search.query(query.q, function(err, ids){
+ search.query(query.q).end(function(err, ids){
// ids are simply indexes in this case
var json = JSON.stringify(ids.map(function(id){ return urls[id]; }));
res.setHeader('Content-Type', 'application/json');
View
@@ -22,7 +22,7 @@ if (!query) throw new Error('query required');
// query
-search.query(query, function(err, ids){
+search.query(query).end(function(err, ids){
if (err) throw err;
var res = ids.map(function(i){ return urls[i]; });
console.log();
View
@@ -300,4 +300,3 @@ Search.prototype.remove = function(id, fn){
Search.prototype.query = function(query){
return new Query(query, this);
};
-

0 comments on commit 67eb434

Please sign in to comment.