...搜索不到结果。 require_once '/home/wlx/xunsearch/sdk/php/lib/XS.php'; $xs=new XS('westdc'); $tokenizer = new XSTokenizerScws; $text = '塔里木河下游浅层地下水变化的生态效应及生态系统健康评价研究项目的汇交数据'; $words = $tokenizer->getResult($text)...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
...l 刷新成功返回 true, 失败则返回 false 源码: sdk/php/lib/XSIndex.class.php#L449 (显示) public function flushLogging(){ try { $this->execCommand(XS_CMD_FLUSH_LOGGING, XS_CMD_OK_LOG_FLUSHED); } catch (XSException $e) { if ($e->getCode() === XS_CMD_ERR_BUSY) { ...
...。。 demo 项目在本地可以运行 search.php中的代码: $xs = new XS(`demo`); $search = $xs->search; $doc = $search->search("项目"); print_r($doc) 但是运行的时候报错,请问有可能是什么原因呢? Fatal error: Uncaught [XSErrorException] /search.php(5): Und...
...turn} int 返回当前库的分词复合等级 源码: sdk/php/lib/XSIndex.class.php#L347 (显示) public function getScwsMulti(){ $cmd = array('cmd' => XS_CMD_SEARCH_SCWS_GET, 'arg1' => XS_CMD_SCWS_GET_MULTI); $res = $this->execCommand($cmd, XS_CMD_OK_INFO); return intval($res->bu...
...b3我在这个位置无论使用那种方式,都会出现如下错误 [XSException] lib/XS.php(1832): Failed to open file(S#513) #0 ../phplib/XS.php(1089): XSServer->execCommand(Array, 250) #1 ../phplib/XS.php(1094): XSIndex->addExdata('????????111????...') #2 ../phplib/XS.php(1100): XSIndex->...
...k --sql="SELECT * FROM documents" --project=demo 开始重建索引 ... [XSException] lib/XS.php(2094): DB has been rebuilding(S#407) #0 lib/XS.php(1192): XSServer->execCommand(Array, 257) #1 Indexer.php(197): XSIndex->beginRebuild() #2 {main}[hr] /sdk/php$ util/RequiredCheck.php Xunsearch PHP...
...汇是包含 [times:次数,attr:词性,word:词] 源码: sdk/php/lib/XSTokenizer.class.php#L361 (显示) public function getTops($text, $limit = 10, $xattr = ''){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_TOPS, $l...
...,打印的是空数据啊,数据库里面有这个关键词的 $xs = new XS('question'); $search = $xs->search; $index = $xs->index; $query = '健身'; // 这里的搜索语句很简单,就一个短语 $search->setQuery($query); // 设置搜索语句 $search...