...引文档 {return} array 切好的词组成的数组 源码: sdk/php/lib/XSTokenizer.class.php#L33 (显示) public function getTokens($value, XSDocument $doc = null); 执行分词并返回词列表
..., 支持 XSCommand 实例或 cmd 构造函数的第一参数 源码: sdk/php/lib/XSServer.class.php#L321 (显示) public function sendCommand($cmd){ if (!$cmd instanceof XSCommand) { $cmd = new XSCommand($cmd); } $this->write(strval($cmd));} 往服务器直接发送指令 (...
__toString() 方法 public void __toString() 源码: sdk/php/lib/XSFieldScheme.class.php#L33 (显示) public function __toString(){ $str = ''; foreach ($this->_fields as $field) { $str .= $field->toConfig() . "\n"; } return $str;} 将对象转换为配置文件字...
...ldBody() {return} XSFieldMeta 类型为 BODY 的字段 源码: sdk/php/lib/XSFieldScheme.class.php#L77 (显示) public function getFieldBody(){ if (isset($this->_typeMap[XSFieldMeta::TYPE_BODY])) { $name = $this->_typeMap[XSFieldMeta::TYPE_BODY]; return $this->_fields[$...
... {return} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L59 (显示) public function clean(){ $this->execCommand(XS_CMD_INDEX_CLEAN_DB, XS_CMD_OK_DB_CLEAN); return $this;} 完全清空索引数据 如果当前数据库处于重建过程中...
...d getTokens($value, $doc=NULL) $value $doc 源码: sdk/php/lib/XSTokenizer.class.php#L147 (显示) public function getTokens($value, XSDocument $doc = null){ $terms = array(); $i = $this->arg; while (true) { $terms[] = substr($value, 0, $i); if ($i >= ...
...tFieldId() {return} XSFieldMeta 类型为 ID 的字段 源码: sdk/php/lib/XSFieldScheme.class.php#L46 (显示) public function getFieldId(){ if (isset($this->_typeMap[XSFieldMeta::TYPE_ID])) { $name = $this->_typeMap[XSFieldMeta::TYPE_ID]; return $this->_fields[$name];...
...ct(string $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);} ...
...t 秒数, 设为 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);} 设置服务端超时秒数
...rver 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.search'] : 8384; $this->_scws = ne...