...] tokenizer = full [subject] type = title [content] type = body #导入 php util/Indexer.php --rebuild --source=mysql://数据库用户名:数据库密码@数据库地址/数据库名 --sql="select t.tid as tid, t.fid as fid, t.author as author, t.authorid as authorid, t.postdate as postdate, t.s...
...tring $content) $content string 新的词典内容 源码: sdk/php/lib/XSIndex.class.php#L495 (显示) public function setCustomDict($content){ $cmd = array('cmd' => XS_CMD_INDEX_USER_DICT, 'arg1' => 1, 'buf' => $content); $this->execCommand($cmd, XS_CMD_OK_DICT_SAVED);} 设...
...秒数, 设为 0则永不超时直到客户端主动关闭 源码: sdk/php/lib/XSServer.class.php#L264 (显示) public function setTimeout($sec){ $cmd = array('cmd' => XS_CMD_TIMEOUT, 'arg' => $sec); $this->execCommand($cmd, XS_CMD_OK_TIMEOUT_SET);} 设置服务端超时秒数
比如php以www用户运行 则tmp/indexd.sock tmp/searchd.sock两个为运行cs-ctl.sh的用户权限 我现在就是root了 能否指定运行用户呢? 现在这俩文件权限是0755 但是连接出现 Fatal error: Uncaught [XSException] ../../../usr/local/hush/sdk/php/lib/XS.php(2177): Pe...
...le [sub_text] type = body [sub_date] type = numeric 于是使用php进行测试,代码如下 没有显示任何结果 data目录下也没有任何文件 求解
... public int getDbTotal() {return} int 数据总量 源码: sdk/php/lib/XSSearch.class.php#L659 (显示) public function getDbTotal(){ $cmd = new XSCommand(XS_CMD_SEARCH_DB_TOTAL); $res = $this->execCommand($cmd, XS_CMD_OK_DB_TOTAL); $tmp = unpack('Itotal', $res->buf); return...
...关数据,就是搜不到。 require_once '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('zl'); $index = $xs->index; $doc = new XSDocument; $conn=mysql_connect("localhost", "root", "111111") or die("Could not connect: " . mysql_error()); mysql_select_db('zi, $conn) or die ('Can...
... XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L256 (显示) public function setIgnore($yes = true){ $this->_setting['ignore'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_IGNORE, $yes === false ? 0 : 1);...
...搜索则取得的数量就不对了 虽然http://www.xunsearch.com/doc/php/guide/search.count上提示“对于不带参数的 count 调用建议放在 search 之后,内部会进行优化,减少一次查询。”但我要进行分页,count()的操作不可能放在search()后面吧? ...
...个页面包含了 require_once '/data/new_shop/public/xunsearch-full/sdk/php/lib/XS.php'; 文件或者生成demo搜索页都报同一个错误; 错误:[XSErrorException] ../../../software/install/xunsearch-full/sdk/php/lib/XS.php(501): xcache_get(): XCache var cache was not initialized p...