...getTokens() 方法 abstract public array getTokens(string $value, XSDocument $doc=NULL) $value string 待分词的字段值(UTF-8编码) $doc XSDocument 当前相关的索引文档 {return} array 切好的词组成的数组 源码: sdk/php/lib/XSTokenizer.class.php...
getTokens() 方法 public void 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[] = subs...
... $xs = new XS('test'); $skey = $_GET["skey"]; $search = $xs->search; $docs = $search->setQuery($skey."type:1")->search(); print_r($docs); 已经 [type] type = string index = self 了 但是搜索不到什么 改成 $docs = $search->setQuery($skey)->search(); 就可以 type这个...
getTokens() 方法 public void getTokens($value, $doc=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->...
... } }} getTokens() 方法 public void getTokens($value, $doc=NULL) $value $doc 源码: sdk/php/lib/XSTokenizer.class.php#L116 (显示) public function getTokens($value, XSDocument $doc = null){ $terms = array(); for ($i = 0; $i < strlen($value); $i +=...
... } }} getTokens() 方法 public void 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) { ...
...ats as $node){ $cid = $node->getId(); if($i++ == 0){ $doc->setField('cid', $cid); }else{ $doc->addTerm('cid', $cid); } // 父类别id while($node = $node->getParent()){ $doc->addTerm('cid', $node->getId()); } } 搜索 $...
...搜索、搜索建议和纠错等内容。 [url]http://www.xunsearch.com/doc/php/guide/util.logger[/url] 2. 小修改大提升,支持自定义 SCWS 分词词典,文本格式。但旧有索引必须重建,新增的词汇才能生效。 [url]http://www.xunsearch.com/doc/php/guide/index.dict...
...自动关闭开启的 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($do...
...nsearch/sdk/php/lib/XS.php'; $xs = new XS('zl'); $index = $xs->index; $doc = new XSDocument; $conn=mysql_connect("localhost", "root", "111111") or die("Could not connect: " . mysql_error()); mysql_select_db('zi, $conn) or die ('Can\'t use test : ' . mysql_error()); $result=mysql_query("sele...