...Duality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : 1); return $this;} 设置散字二元组合
...y(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_TOPS, $limit, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_TOPS); while ($res->buf !== '') { $tmp = unpack('Itimes/a4attr/a*word', $res->buf); $t...
setMultiSort() 方法 (自版本 v1.1.0 起可用) public XSSearch setMultiSort(array $fields, bool $reverse=false, bool $relevance_first=false) $fields array 排序依据的字段数组, 以字段名称为键, true/false 为值表示正序或逆序 $reverse bool 是否为倒...
addSearchLog() 方法 (自版本 v1.1.1 起可用) public void addSearchLog(string $query, int $wdf=1) $query string 需要记录的数据 $wdf int 需要记录的次数, 默认为 1 源码: sdk/php/lib/XSSearch.class.php#L831 (显示) public function addSearchLog($query,...
[XSException] ThinkPHP/Extend/Vendor/sdk/php/lib/XS.php(2087): Unknown Internal Error(S#600) 现在又报这个错误 我执行最新的程序后查看了下执行后的日志: 2012-12-10 13:39:13 worker1[17463] new connection (SOCK:7, IP:127.0.0.1, BURST:1) 2012-12-10 13:39:13 worker1[17463] [soc...
...de) & self::MULTI_MASK; $this->_setting['multi'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_MULTI, $mode); return $this;} 设置复合分词选项
因为搜索结果很多,而php中search函数是通过getRespond来接收数据的,不可以思议的是,结果不是一次发送的,而是一个字段一个字段分开发送,这引发了大量的send操作,当然应用层做了缓冲1024字节,每次超过1024字节时候才发送...
...录数组, 不存在同义词则返回空数组 源码: sdk/php/lib/XSSearch.class.php#L187 (显示) public function getSynonyms($term){ $term = strval($term); if (strlen($term) === 0) { return false; } $cmd = array('cmd' => XS_CMD_SEARCH_GET_SYNONYMS, 'arg1' => 2, 'buf' => $...
...的跳过就可以了。例如: [php]$query = "id:1753"; $docs = $xs->search->search($query); print_r($docs);[/php]
...索词为键, 搜索指数为值的关联数组 源码: sdk/php/lib/XSSearch.class.php#L673 (显示) public function getHotQuery($limit = 6, $type = 'total'){ $ret = array(); $limit = max(1, min(50, intval($limit))); // query from log_db $this->xs->setScheme(XSFieldScheme::logger())...