...rch === null) { $conns = array(); if (!isset($this->_config['server.search'])) { $conns[] = 8384; } else { foreach (explode(';', $this->_config['server.search']) as $conn) { $conn = trim($conn); if ($conn !== '') { ...
getScwsServer() 方法 public XSServer getScwsServer() {return} XSServer 分词服务器 源码: sdk/php/lib/XS.class.php#L467 (显示) public function getScwsServer(){ if ($this->_scws === null) { $conn = isset($this->_config['server.search']) ? $this->_config['server....
...hp#L188 (显示) public function __construct($arg = null){ if (self::$_server === null) { $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should be created before using ' . __CLASS__); } self::$_server = $xs->getScwsServer()...
..._CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_RESULT); while ($res->buf !== '') { $tmp = unpack('Ioff/a4attr/a*word', $res->buf); $tmp['word'] = XS::convert($tmp['word'], self::$_charset, 'UTF-8'); $words[]...
... scheme XSFieldScheme 获取当前在用的字段方案 XS scwsServer XSServer 创建 scws 分词连接 XS search XSSearch 获取搜索操作对象 XS Public 方法 隐去继承来的方法 名称描述定义于 __construct() 构造函数 XS ...
..._SCWS_GET, XS_CMD_SCWS_GET_TOPS, $limit, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_TOPS); while ($res->buf !== '') { $tmp = unpack('Itimes/a4attr/a*word', $res->buf); $tmp['word'] = XS::convert($tmp['word'], self::$_charset, 'UTF-8'); $words[]...
...ommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_VERSION); $res = self::$_server->execCommand($cmd, XS_CMD_OK_INFO); return $res->buf;} 获取 scws 版本号
...EARCH_SCWS_GET, XS_CMD_SCWS_HAS_WORD, 0, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CMD_OK_INFO); return $res->buf === 'OK';} 判断是否包含指定词性的词