我一直使用石灰石模块和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)请在这方面帮帮我!
发布于 2012-03-02 17:57:28
好的,我在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包),并且它工作了!因此,如果您可以升级,这可能是一个好主意--而且石灰石可能只会跟踪最新的版本。
https://stackoverflow.com/questions/9530371
复制相似问题