搜索

大约有 200 项符合查询结果, 库内数据总量为 3,513 项。 (搜索耗时:0.0051秒)

61.修改SDK连接异常提示

更新时间:2012-04-24 14:04 t By zlhgo

请问可不可以在下一版中把SDK XS.php 2202行处 [code]throw new XSException($error . '(C#' . $errno . ')'); [/code] 直接修改为相关错误信息呢(或用英文提示错误信息) [code]throw new XSException('由于目标机器积极拒绝,无法连接'. '(C#' . $errno . ')'); [...

62.XS::convert

... iconv($from, $to . '//TRANSLIT', $data); } else { throw new XSException('Cann\'t find the mbstring or iconv extension to convert encoding'); } } return $data;} 字符集转换 要求安装有 mbstring, iconv 中的一种

63.在 Xunsearch 使用 SCWS

...考手册 [XSTokenizerScws]。 #### 创建分词对象 ~~~ [php] $xs = new XS(...); // 必须先创建一个 xs 实例,否则会抛出异常 $tokenizer = new XSTokenizerScws; // 直接创建实例 ~~~ ### 获取分词结果 调用 [XSTokenizerScws::getResult] 对参数指定的文本字符串...

64.XSSearch::getDbTotal

.../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'];} 获取搜索数据库内的数据总量

65.XS

... 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...

66.XSTokenizerScws::__construct

... $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(); ...

67.XSTokenizerScws::setIgnore

...) 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;} 设置忽略标点符号

68.XSException 异常

...方式: ~~~ [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...

69.XSSearch::getExpandedQuery

...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;} 获取展开的搜索词列表

70.XSTokenizerScws::setDuality

... 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;} 设置散字二元组合

  • 时间不限
  • 按相关性排序