...=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 >= strlen($value)) { ...
...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]; } return false;} ...
XSIndex 索引管理 通过 [XSIndex] 对象实现索引数据库的增、删、改等相关操作。实现使用过程中并不需要 自行创建该对象,而是直接访问 [XS::index] 即可。 ~~~ [php] require '$prefix/sdk/php/lib/XS.php'; $xs = new XS('demo'); $index = $xs...
... $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);} 设置自定义词典...
...永不超时直到客户端主动关闭 源码: 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);} 设置服务端超时秒数
直接XSIndex::flushIndex 就提示 Fatal error: Undefined class constant 'flushIndex' XSIndex::flushIndex()就提示Method "execCommand" does not exist and was not trapped in __call() 求解决哈!
...ver() {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 = new XSServer($con...
... 返回自身对象以支持串接操作 源码: 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
...=NULL) $value $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, $...