... bool 刷新成功返回 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)...
... {return} 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...
... 实现接口 XSTokenizer 版本 1.0.0 源代码 sdk/php/lib/XSTokenizer.class.php 内置的分割分词器 Public 方法 隐去继承来的方法 名称描述定义于 __construct() XSTokenizerSplit getTokens() XSTokenizerSplit 方...
...uft-8;求助我错在那里? require '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('allsource'); // 建立 XS 对象,项目名称为:demo $search = $xs->search; // 获取 搜索对象 $query = '部分'; // 这里的搜索语句很简单,就一个短语 $search->setQuery(...
...ch.php(5): Undefined index: key(8) thrown in /home/boyce/xunsearch/sdk/php/lib/XS.php on line 469 [/quote] 你是不是用的旧版本,这是因为变量使用不严谨导致的,建议在搜索 代码开头用 error_reporting(E_ALL ^ E_NOTICE) 屏蔽NOTICE级的错误 。
...omDict() {return} string 自定义词库内容 源码: sdk/php/lib/XSIndex.class.php#L484 (显示) public function getCustomDict(){ $res = $this->execCommand(XS_CMD_INDEX_USER_DICT, XS_CMD_OK_INFO); return $res->buf;} 获取自定义词典内容
...55.35 {return} string 修正后的搜索语句 源码: sdk/php/lib/XSSearch.class.php#L949 (显示) public function addQueryString($query, $addOp = XS_CMD_QUERY_OP_AND, $scale = 1){ $query = $this->preQueryString($query); $bscale = ($scale > 0 && $scale != 1) ? pack('n', intval($s...
oh 谢谢!我试试[hr] require_once '/mnt/search/sdk/php/lib/XS.php'; $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 了 但是搜索不到什么 改成...
...8 INFO: reach end of file or error occured, total lines: 3 [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('????????1??????...') #2 ../phplib/XS.php(1100): XSIndex->openBuffer(0...
...p sdk/php/util/Quest.php goods id:3122 --show-query [XSException] sdk/php/lib/XS.php(2455): Failed to recv the data from server completely (SIZE:0/8, REASON:timeout) #0 sdk/php/lib/XS.php(2395): XSServer->read(8) #1 sdk/php/lib/XS.php(2380): XSServer->getRespond() #2 sdk/php/lib/XS.php(1686): XS...