【发布时间】:2012-11-02 14:38:13
【问题描述】:
我需要在我的配置文件中为每个索引使用两个 sql_attr_uint 值。我从上一篇文章中发现不要对通过命令行的搜索命令过于相信。 Sphinx PHP API order differs from Search Daemon
我当前的问题是,当被 PHP API 访问时,我无法检索这两个 sql_attr_uint 值(但是,当通过命令行使用搜索时,两个 sql_attr_uint 值都会出现)
下面是我的配置文件.. http://pastebin.com/30Si7bw5
通过 PHP API 获取结果时,我只能看到 sql_attr_uint table_id,但看不到名为 pub_id 的 sql_attr_uint。
谁能建议它为什么会这样做?
$cl = new SphinxClient();
$cl->SetServer($CONF['sphinx_host'], $CONF['sphinx_port']);
$cl->SetMatchMode($mode);
$cl->SetLimits(0, 1000);
// below line commented out atm - to only show those rows with this sql_attr_uint of 760 (is this the correct syntax?)
//$cl->SetFilter ( 'pub_id', array(760), FALSE );
$result = $cl->Query($q);
【问题讨论】:
标签: php api full-text-search sphinx