...t[$body] = $doc->f($type); } $this->restoreDb(); } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; } } $this->xs->restoreScheme(); return $ret;} 获取热门搜索词列表
...", XS::convert($res->buf, $this->_charset, 'UTF-8')); } } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; } } return $ret;} 获取修正后的搜索词列表 通常当某次检索结果数量偏少时, 可以用该函数设计...
... if ($ff->type !== XSFieldMeta::TYPE_STRING) { throw new XSException("Field `$name' cann't be used for facets search, can only be string type"); } $buf .= chr($ff->vno); } $cmd = array('cmd' => XS_CMD_SEARCH_SET_FACETS, 'buf' => $buf); $cmd['arg1'] = $exact =...
... $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should be created before using ' . __CLASS__); } self::$_server = $xs->getScwsServer(); self::$_server->setTimeout(0); self::$_charset = $xs->getDefaultCharset(); ...
...nv($from, $to . '//TRANSLIT', $data); } else { throw new XSException('Cann\'t find the mbstring or iconv extension to convert encoding'); } } return $data;} 字符集转换 要求安装有 mbstring, iconv 中的一种
...$ret) == $limit) { break; } } } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; } } $this->restoreDb(); $this->xs->restoreScheme(); $this->_defaultOp = $op; return $ret;} 获取相关搜索...
...php 搜索的时候,出现的。权限需要怎么解决? 错误:[XSException] ../../../../usr/local/xunsearch/sdk/php/lib/XS.php(2481): Permission denied(C#13, localhost:8384) [/quote] 原因是防火墙的问题。 你可以先试 #setenforce 0 然后在打开你的搜索页,搜...
... if (strlen($from) > 255 || strlen($to) > 255) { throw new XSException('Value of range is too long'); } $vno = $this->xs->getField($field)->vno; $from = XS::convert($from, 'UTF-8', $this->_charset); $to = XS::convert($to, 'UTF-8', $this->_charset); ...
...arch {CMD:' . $res->cmd . ', ARG:' . $res->arg . '}'; throw new XSException($msg); } } if ($query === '') { $this->_count = $this->_lastCount; // trigger log & highlight if ($this->_curDb !== self::LOG_DB) { $this->logQuery(); if ($s...
...y = $doc->f($fid); if ($key === null || $key === '') { throw new XSException('Missing value of primary key (FIELD:' . $fid . ')'); } // request cmd $cmd = new XSCommand(XS_CMD_INDEX_REQUEST, XS_CMD_INDEX_REQUEST_ADD); if ($add !== true) { $cmd->arg1 = XS_CMD_INDEX_REQUES...