...rt|本地套接字路径> 源码: sdk/php/lib/XSServer.class.php#L165 (显示) public function open($conn){ $this->close(); $this->_conn = $conn; $this->_flag = self::BROKEN; $this->_sendBuffer = ''; $this->_project = null; $this->connect(); $this->_flag ^= self::BROKEN; ...
...身以支持串接操作 源码: 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);} 添加权重索引词 无论是否包含这种词都不影响搜索匹配, ...
...身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L461 (显示) public function setLimit($limit, $offset = 0){ $this->_limit = intval($limit); $this->_offset = intval($offset); return $this;} 设置搜索结果的数量和偏移 用于搜索结果分页, 每次调用 ...
...身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L147 (显示) public function setSynonymScale($value){ $arg1 = XS_CMD_SEARCH_MISC_SYN_SCALE; $arg2 = max(0, (intval($value * 100) & 255)); $cmd = new XSCommand(XS_CMD_SEARCH_SET_MISC, $arg1, $arg2); $this->execCommand($...
...象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L391 (显示) public function beginRebuild(){ $this->execCommand(array('cmd' => XS_CMD_INDEX_REBUILD, 'arg1' => 0), XS_CMD_OK_DB_REBUILD); $this->_rebuild = true; return $this;} 开始重建索引 此后所有的索引...
...象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L420 (显示) public function stopRebuild(){ try { $this->execCommand(array('cmd' => XS_CMD_INDEX_REBUILD, 'arg1' => 2), XS_CMD_OK_DB_REBUILD); $this->_rebuild = false; } catch (XSException $e) { if ($e->g...
...记过则返回空数组 源码: sdk/php/lib/XSSearch.class.php#L427 (显示) public function getFacets($field = null){ if ($field === null) { return $this->_facets; } return isset($this->_facets[$field]) ? $this->_facets[$field] : array();} 读取最近一次分面搜索记...
...务端交互的字符串 源码: sdk/php/lib/XSServer.class.php#L83 (显示) public function __toString(){ if (strlen($this->buf1) > 0xff) { $this->buf1 = substr($this->buf1, 0, 0xff); } return pack('CCCCI', $this->cmd, $this->arg1, $this->arg2, strlen($this->buf1), strlen($this...
...录的次数, 默认为 1 源码: sdk/php/lib/XSSearch.class.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_L...
...指定词性的词汇 源码: sdk/php/lib/XSTokenizer.class.php#L382 (显示) public function hasWord($text, $xattr){ $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_HAS_WORD, 0, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CM...