... {return} XSSearch 返回自身对象以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L444 (显示) public function setScwsMulti($level){ $level = intval($level); if ($level >= 0 && $level < 16) { $cmd = array('cmd' => XS_CMD_SEARCH_SCWS_SET, 'arg1' => XS_CMD_SCWS_S...
...ue, 若返回 false 将阻止该文档提交到索引服务器 源码: sdk/php/lib/XSDocument.class.php#L331 (显示) public function beforeSubmit(XSIndex $index){ if ($this->_charset === null) { $this->_charset = $index->xs->getDefaultCharset(); } return true;} 重写接口...
getIterator() 方法 public void getIterator() 源码: sdk/php/lib/XSDocument.class.php#L272 (显示) public function getIterator(){ if ($this->_charset !== null && $this->_charset !== 'UTF-8') { $from = $this->_meta === null ? $this->_charset : 'UTF-8'; $to = $this->_me...
...n} XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L299 (显示) public function addDict($fpath, $mode = null){ if (!is_int($mode)) { $mode = stripos($fpath, '.txt') !== false ? SCWS_XDICT_TXT : SCWS_XDICT_XDB; } if (!isset($...
... {return} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L246 (显示) public function setMultiSort($fields, $reverse = false, $relevance_first = false){ if (!is_array($fields)) { return $this->setSort($fields, !$reverse, $relevance_first);...
... {return} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L386 (显示) public function addWeight($field, $term, $weight = 1){ return $this->addQueryTerm($field, $term, XS_CMD_QUERY_OP_AND_MAYBE, $weight);} 添加权重索引词 无论是否包...
...多相关数据,就是搜不到。 require_once '/usr/local/xunsearch/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...
...为 20 {return} array 返回搜索词组成的数组 源码: sdk/php/lib/XSSearch.class.php#L707 (显示) public function getRelatedQuery($query = null, $limit = 6){ $ret = array(); $limit = max(1, min(20, intval($limit))); // Simple to disable query with field filter if ($q...
...结果则返回 true, 其它返回响应的 XSCommand 对象 源码: sdk/php/lib/XSServer.class.php#L279 (显示) public function execCommand($cmd, $res_arg = XS_CMD_NONE, $res_cmd = XS_CMD_OK){ // create command object if (!$cmd instanceof XSCommand) { $cmd = new XSCommand($cmd); ...
...用是否由于 IO 错误引起的, 以免发送 quit 指令 源码: sdk/php/lib/XSServer.class.php#L198 (显示) public function close($ioerr = false){ if ($this->_sock && !($this->_flag & self::BROKEN)) { if (!$ioerr && $this->_sendBuffer !== '') { $this->write($this->_se...