update() 方法 public XSIndex update(XSDocument $doc, bool $add=false) $doc XSDocument $add bool 是否为新增文档, 已有数据中不存在同一主键的其它数据 {return} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class....
search() 方法 public XSDocument[] search(string $query=NULL, boolean $saveHighlight=true) $query string 搜索语句, 若传入 null 使用默认语句, 最大长度为 80 字节 $saveHighlight boolean 是否存储查询词用于高亮处理, 默认为 true {return} XS...
XSDocument All Packages | 方法(函数) 包 XS 继承关系 class XSDocument 实现接口 ArrayAccess, IteratorAggregate, Traversable 版本 1.0.0 源代码 sdk/php/lib/XSDocument.class.php 文档用于描述检索/索引的基础对象, 包含一组字段...
...lib/XSTokenizer.class.php#L116 (显示) public function getTokens($value, XSDocument $doc = null){ $terms = array(); for ($i = 0; $i < strlen($value); $i += $this->arg) { $terms[] = substr($value, $i, $this->arg); } return $terms;}
...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)) { break; } $i += $this->arg; } retur...
...此自动关闭开启的 rebuild add() 方法 public XSIndex add(XSDocument $doc) $doc XSDocument {return} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L72 (显示) public function add(XSDocument $doc){ return $this->update(...
...$this->search($type . ':1'); foreach ($result as $doc) /* @var $doc XSDocument */ { $body = $doc->body; $ret[$body] = $doc->f($type); } $this->restoreDb(); } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; ...
...lib/XSTokenizer.class.php#L220 (显示) public function getTokens($value, XSDocument $doc = null){ $tokens = array(); $this->setIgnore(true); // save charset, force to use UTF-8 $_charset = self::$_charset; self::$_charset = 'UTF-8'; $words = $this->getResult($value); foreach (...