我一直在使用limestone模块和Nodejs来查询sphinx索引。石灰石在我的npm中已过时,所以我从github下载了它并成功连接到sphinx服务器。但我现在面临的问题如下,
当我尝试执行以下代码时,
var limestone = require("limestone").SphinxClient(),
sys = require("sys");
limestone.connect("192.168.2.443:9312", // port. 9312 is standard Sphinx port. also 'host:port' allowed
function(err) {
if (err) {
sys.puts('Connection error: ' + err);
}
sys.puts('Connected, sending query');
limestone.query(
{'query':'raja',maxmatches:1},
function(err, answer) {
if(err){
console.log("Sphinx ERR: "+err);
}else{
console.log(JSON.stringify(answer));
limestone.disconnect();
}
});
});
我收到了以下错误,
Sphinx ERR: Searchd command older than client's version, some options might not workServer issued ERROR: 0bad multi-query count 0 (must be in 1..32 range)
请帮助我!
答案 0 :(得分:1)
好的,所以我在Ubuntu上安装了sphinxseach
,存储库中的版本是0.9.9
。我收到了与你类似的错误:
Searchd command older than client's version, some options might not workServer issued ERROR: Qclient version is higher than daemon version (client is v.1.24, daemon is v.1.22) undefined
在limestone's github查看问题之后,我认为它应该适用于Sphinx版本2.所以我从Sphinx download page安装了2.0.4
(他们有Ubuntu软件包),它作品!所以,如果您可以升级,那么无论如何这可能是一个好主意 - 而且石灰石可能只会跟踪最新版本。