...部分', 'chrono' => time() ); // 创建文档对象 $doc = new XSDocument; $doc->setFields($data);
...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...
.../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); } return explode($this->arg, $value);}
请问 类似 XSDocument::addTerm的操作 能否在批量导入sql数据生成索引时 实现?比如在自定义DataFilter里?
.../lib/XSTokenizer.class.php#L46 (显示) public function getTokens($value, XSDocument $doc = null){ return array();}
.../lib/XSTokenizer.class.php#L62 (显示) public function getTokens($value, XSDocument $doc = null){ return array($value);}
...,update也可以的 $index->beginRebuild(); $data = array(); $doc = new XSDocument; $doc->setFileds($data); $index->add($doc); // 这里是结束 $index->endRebuild();
...okenizerXyz implements XSTokenizer { public function getTokens($value, XSDocument $doc = null) { $ret = array(); if (!empty($value)) $ret = explode('-', $value); return $ret; } } ~~~ > note: [XSTokenizer::getTokens] 的参数 `$value` 的编码始终...
... /home/www/xunsearch/sdk/php/util/Indexer.php(237): XSIndex->update(Object(XSDocument)) 数据库是UTF-8字符集。