__construct() 方法 public void __construct(mixed $cmd, int $arg1=0, int $arg2=0, string $buf='', string $buf1='') $cmd mixed 命令类型或命令数组 当类型为 int 表示命令代码, 范围是 1~255, 参见 xs_cmd.inc.php 里的定义 当类型为 array 时忽...
...f 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_REQUEST_UPDATE; $cmd->arg2 = $fid->vno; $cmd->buf = $key; } $cmds = array($cmd); // do...
...void sendCommand(mixed $cmd) $cmd mixed 要提交的指令, 支持 XSCommand 实例或 cmd 构造函数的第一参数 源码: sdk/php/lib/XSServer.class.php#L321 (显示) public function sendCommand($cmd){ if (!$cmd instanceof XSCommand) { $cmd = new XSCommand($cmd); } ...
getRespond() 方法 public XSCommand getRespond() {return} XSCommand 成功返回响应指令 源码: sdk/php/lib/XSServer.class.php#L334 (显示) public function getRespond(){ // read data from server $buf = $this->read(8); $hdr = unpack('Ccmd/Carg1/Carg2/Cblen1/Iblen',...
..._arg=0, int $res_cmd=128) $cmd mixed 要提交的指令, 若不是 XSCommand 实例则作为构造函数的第一参数创建对象 $res_arg int 要求的响应参数, 默认为 XS_CMD_NONE 即不检测, 若检测结果不符 则认为命令调用失败, 会返回 false 并设...
...F-8', $this->_charset); if ($from === null) { $cmd = new XSCommand(XS_CMD_QUERY_VALCMP, XS_CMD_QUERY_OP_FILTER, $vno, $to, chr(XS_CMD_VALCMP_LE)); } elseif ($to === null) { $cmd = new XSCommand(XS_CMD_QUERY_VALCMP, XS_CMD_QUERY_OP_FILTER, $vno, $from, chr(XS_CMD_V...
...务器操作对象 同时兼容于 indexd, searchd, 所有交互均采用 XSCommand 对象 Public 属性 隐去继承来的属性 名称类型描述定义于 connString string 连接字符串 XSServer project string 获取当前项目名称 XSServer respon...
...setting['add_dict'] = array(); } $this->_setting['add_dict'][] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_ADD_DICT, $mode, $fpath); return $this;} 添加分词词典, 支持 TXT/XDB 格式 getResult() 方法 public array getResult(string $text) $text string ...
... $asc, $relevance_first); } if ($field === null) { $cmd = new XSCommand(XS_CMD_SEARCH_SET_SORT, XS_CMD_SORT_TYPE_RELEVANCE); } else { $type = XS_CMD_SORT_TYPE_VALUE; if ($relevance_first) { $type |= XS_CMD_SORT_FLAG_RELEVANCE; } if ($asc) { ...
... 包类对象描述 XS XS XS 搜索项目主类 XSCommand XSCommand 命令对象 XSComponent XS 组件基类 XSDocument 文档用于描述检索/索引的基础对象, 包含一组字段及其值, 相当于常规SQL数据表中的一行记录. XSErrorExcept...