...无旧语句或为空则这此无意义, 支持的操作符有: XS_CMD_QUERY_OP_AND XS_CMD_QUERY_OP_OR XS_CMD_QUERY_OP_AND_NOT XS_CMD_QUERY_OP_XOR XS_CMD_QUERY_OP_AND_MAYBE XS_CMD_QUERY_OP_FILTER $scale float 权重计算缩放比例, 默认为 1...
...29 (显示) public function setAutoSynonyms($value = true){ $flag = XS_CMD_PARSE_FLAG_BOOLEAN | XS_CMD_PARSE_FLAG_PHRASE | XS_CMD_PARSE_FLAG_LOVEHATE; if ($value === true) { $flag |= XS_CMD_PARSE_FLAG_AUTO_MULTIWORD_SYNONYMS; } $cmd = array('cmd' => XS_CMD_QUERY_PARSEFLAG, 'arg' ...
...动转换为通讯字符串, 命令结构参见 C 代码中的 struct xs_cmd 定义, 头部长度为 8字节. Public 属性 隐去继承来的属性 名称类型描述定义于 arg int 获取属性 arg 的值 XSCommand arg1 int 参数1 取值范围 0~255, 具体...
..._limit > 0 ? $this->_limit : self::PAGE_SIZE); // get result header $cmd = new XSCommand(XS_CMD_SEARCH_GET_RESULT, 0, $this->_defaultOp, $query, $page); $res = $this->execCommand($cmd, XS_CMD_OK_RESULT_BEGIN); $tmp = unpack('Icount', $res->buf); $this->_lastCount = $tmp['count']; /...
...ction addDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_ADD_DB, 'buf' => $name)); $this->_curDbs[] = $name; return $this;} 添加搜索的数据库名, 支持多库同时搜索 参见 setDb addQueryString() 方法 public string addQue...
...p/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->buf);} 获取当前索引库的分词复合等级
... } if (!$ioerr && !($this->_flag & self::FILE)) { $cmd = new XSCommand(XS_CMD_QUIT); fwrite($this->_sock, $cmd); } fclose($this->_sock); $this->_flag |= self::BROKEN; }} 关闭连接 附带发送发送 quit 命令 connect() 方法 ...
...rt($field, $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 ($a...
...ass.php#L831 (显示) public function addSearchLog($query, $wdf = 1){ $cmd = array('cmd' => XS_CMD_SEARCH_ADD_LOG, 'buf' => $query); if ($wdf > 1) { $cmd['buf1'] = pack('i', $wdf); } $this->execCommand($cmd, XS_CMD_OK_LOGGED);} 添加搜索日志关键词到缓冲区里 需...
...ndex.class.php#L495 (显示) public function setCustomDict($content){ $cmd = array('cmd' => XS_CMD_INDEX_USER_DICT, 'arg1' => 1, 'buf' => $content); $this->execCommand($cmd, XS_CMD_OK_DICT_SAVED);} 设置自定义词典内容