...tring 新的词典内容 源码: 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);} 设置自定义词典内容
...到客户端主动关闭 源码: 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);} 设置服务端超时秒数
...n} XSServer 分词服务器 源码: sdk/php/lib/XS.class.php#L467 (显示) public function getScwsServer(){ if ($this->_scws === null) { $conn = isset($this->_config['server.search']) ? $this->_config['server.search'] : 8384; $this->_scws = new XSServer($conn, $this); } ...
...对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L72 (显示) public function add(XSDocument $doc){ return $this->update($doc, true);} 添加文档到索引中 特别要注意的是: 系统不会自动检测主键是否冲突, 即便已存在相同主键也会添加进...
__unset() 方法 public void __unset(string $name) $name string 属性名称 源码: sdk/php/lib/XS.class.php#L231 (显示) public function __unset($name){ $this->__set($name, null);} 魔术方法 __unset 删除、取消模拟属性, 相当于设置属性值为 null
...ue $doc 源码: sdk/php/lib/XSTokenizer.class.php#L86 (显示) public function getTokens($value, XSDocument $doc = null){ if (strlen($this->arg) > 2 && substr($this->arg, 0, 1) == '/' && substr($this->arg, -1, 1) == '/') { return preg_split($this->arg, $value); } ...
...} string 版本号 源码: sdk/php/lib/XSTokenizer.class.php#L327 (显示) public function getVersion(){ $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_VERSION); $res = self::$_server->execCommand($cmd, XS_CMD_OK_INFO); return $res->buf;} 获取 scws 版本号
...urn} 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 $tmp['total'];} 获取搜索...
...eldMeta 字段元数据对象 源码: sdk/php/lib/XS.class.php#L514 (显示) public function getField($name, $throw = true){ return $this->_scheme->getField($name, $throw);} 获取项目字段元数据
..., 若无则返回 null 源码: sdk/php/lib/XSDocument.class.php#L221 (显示) public function getAddIndex($field){ $field = strval($field); if ($this->_texts === null || !isset($this->_texts[$field])) { return null; } return $this->autoConvert($this->_texts[$field]);} 获...