diff --git a/README.markdown b/README.markdown index 7e2bf5a..44eb2c6 100644 --- a/README.markdown +++ b/README.markdown @@ -3,19 +3,19 @@ Usage: var limestone = require("./limestone").SphinxClient(), - sys = require("sys"); + util = require('util'); limestone.connect(9312, // port. 9312 is standard Sphinx port. also 'host:port' allowed function(err) { // callback if (err) { - sys.puts('Connection error: ' + err); + util.puts('Connection error: ' + err); } - sys.puts('Connected, sending query'); + util.puts('Connected, sending query'); limestone.query( {'query':'test', maxmatches:1}, function(err, answer) { limestone.disconnect(); - sys.puts("Extended search for 'test' yielded " + + util.puts("Extended search for 'test' yielded " + answer.match_count + " results: " + JSON.stringify(answer)); }); @@ -26,9 +26,9 @@ To Use Build_Excerpts: limestone.connect(9312, // port function(err) { //callback if (err) { - sys.puts('Connection error: ' + err); + util.puts('Connection error: ' + err); } - sys.puts('Connected Build Excerpts'); + util.puts('Connected Build Excerpts'); limestone.build_excerpts( ['this is my teste text to be highlighted', 'this is another test text to be highlighted'], // docs @@ -37,7 +37,7 @@ To Use Build_Excerpts: {}, function(err, answer) { limestone.disconnect(); - sys.puts(JSON.stringify(answer)); + util.puts(JSON.stringify(answer)); } ); }); @@ -49,16 +49,16 @@ You can ask sphinx to open a persistent connection. You can then make several re true, // persistent (optional) function(err) { // callback if (err){ - sys.puts('Connection error: ' + err); + util.puts('Connection error: ' + err); } - sys.puts('Connected Search'); - sys.puts('sending query'); + util.puts('Connected Search'); + util.puts('sending query'); limestone.query( {'query':'test', // query obj with sphinx opts maxmatches:1, indexes:'questions_1,products_3'}, function(err, answer){ // callback - sys.puts('Extended search yielded ' + + util.puts('Extended search yielded ' + answer.match_count + " results\n" + JSON.stringify(answer)); @@ -70,7 +70,7 @@ You can ask sphinx to open a persistent connection. You can then make several re {}, function(err, answer){ limestone.disconnect(); - sys.puts(JSON.stringify(answer)); + util.puts(JSON.stringify(answer)); } ); diff --git a/buffer_extras.js b/buffer_extras.js index b88569a..a67ca1b 100644 --- a/buffer_extras.js +++ b/buffer_extras.js @@ -231,7 +231,7 @@ proto.toReader = function toReader() { }; // Test It -// var sys = require('sys'); +// var util = require('util'); // // var w = Buffer.makeWriter(); // w.push.int32(305419896); @@ -243,9 +243,9 @@ proto.toReader = function toReader() { // w.push.int32(0x12345678); // w.push.int16(0x1234); // var b = w.toBuffer(); -// // sys.p(b); +// // util.p(b); // var r = b.toReader(); -// sys.p([ +// util.p([ // r.int32(), // r.int16(), // r.string(5),