... public function getTokens($value, XSDocument $doc = null) { $terms = array(); for ($i = 0; $i < mb_strlen($value,"utf-8"); $i += $this->arg) { $terms[] = mb_substr($value, $i, $this->arg,"utf-8"); } return $terms; } hightman可以改成这个,那中文一元切分就也...
...来的属性 名称类型描述定义于 allSynonyms array 获取当前库内的全部同义词列表 XSSearch connString string 连接字符串 XSServer correctedQuery array 获取修正后的搜索词列表 XSSearch dbTotal int 获取搜索数...
...E; $cmd->arg2 = $fid->vno; $cmd->buf = $key; } $cmds = array($cmd); // document cmds foreach ($this->xs->getAllFields() as $field) /* @var $field XSFieldMeta */ { // value if (($value = $doc->f($field)) !== null) { $varg = $field->isNumeric() ? XS_C...
...查不出应该是不可能的. [/quote] [quote] $search->setQuery($array['word'])->setSort($array['sort'])->setLimit($array['limit'], $array['offset'])->search(); [/quote] 做了这样 [quote] $search->setSort($array['sort'])->setLimit($array['limit'], $array['offset'])->search($array['wor...
setFields() 方法 public void setFields(array $data) $data array 字段名及其值组成的数组 源码: sdk/php/lib/XSDocument.class.php#L154 (显示) public function setFields($data){ if ($data === null) { $this->_data = array(); $this->_meta = $this->_terms...
...) 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;}
...) 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; } return $terms;}
...update更新修改过的文档后,搜索结果中出现空文档信息 Array ( [0] => XSDocument Object ( [_data:private] => Array ( ) [_terms:private] => [_texts:private] => [_charset:private...
搜索结果正常如下: Array ( [0] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 4089 [name] => 思诺尔 亚麻水立方红色1.5米 [brand_name] => 思诺尔 ...
[code]Array ( [0] => XSDocument Object ( [_data:private] => Array ( [id] => 231859 [title] => 尖子生弃考留学成主流 不少学生脚踩两船 [lv1] => 3 [lv2] => 6...