请问可不可以在下一版中把SDK XS.php 2202行处 [code]throw new XSException($error . '(C#' . $errno . ')'); [/code] 直接修改为相关错误信息呢(或用英文提示错误信息) [code]throw new XSException('由于目标机器积极拒绝,无法连接'. '(C#' . $errno . ')'); [...
... iconv($from, $to . '//TRANSLIT', $data); } else { throw new XSException('Cann\'t find the mbstring or iconv extension to convert encoding'); } } return $data;} 字符集转换 要求安装有 mbstring, iconv 中的一种
...考手册 [XSTokenizerScws]。 #### 创建分词对象 ~~~ [php] $xs = new XS(...); // 必须先创建一个 xs 实例,否则会抛出异常 $tokenizer = new XSTokenizerScws; // 直接创建实例 ~~~ ### 获取分词结果 调用 [XSTokenizerScws::getResult] 对参数指定的文本字符串...
.../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 $tmp['total'];} 获取搜索数据库内的数据总量
... iconv($from, $to . '//TRANSLIT', $data); } else { throw new XSException('Cann\'t find the mbstring or iconv extension to convert encoding'); } } return $data;} 字符集转换 要求安装有 mbstring, iconv 中的一种 getAllFields() 方法 public XSFi...
... $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should be created before using ' . __CLASS__); } self::$_server = $xs->getScwsServer(); self::$_server->setTimeout(0); self::$_charset = $xs->getDefaultCharset(); ...
...) public function setIgnore($yes = true){ $this->_setting['ignore'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_IGNORE, $yes === false ? 0 : 1); return $this;} 设置忽略标点符号
...方式: ~~~ [php] require '$prefix/sdk/php/lib/XS.php'; try { $xs = new XS('demo'); $docs = $xs->search->setQuery('hightman')->setLimit(5)->search(); foreach ($docs as $doc) { echo $doc->rank() . ". " . $doc->subject . " [" . $doc->percent() . "%]\n"; echo $doc->mess...
...arch {CMD:' . $res->cmd . ', ARG:' . $res->arg . '}'; throw new XSException($msg); } } } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; } } return $ret;} 获取展开的搜索词列表
... public function setDuality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : 1); return $this;} 设置散字二元组合