...搜索词组成的数组 源码: sdk/php/lib/XSSearch.class.php#L755 (显示) public function getExpandedQuery($query, $limit = 10){ $ret = array(); $limit = max(1, min(20, intval($limit))); try { $buf = XS::convert($query, 'UTF-8', $this->_charset); $cmd = array('cmd' =>...
...,attr:词性,word:词] 源码: sdk/php/lib/XSTokenizer.class.php#L361 (显示) public function getTops($text, $limit = 10, $xattr = ''){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_TOPS, $limit, $text, $xattr); $...
...身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L98 (显示) public function setCutOff($percent, $weight = 0){ $percent = max(0, min(100, intval($percent))); $weight = max(0, (intval($weight * 10) & 255)); $cmd = new XSCommand(XS_CMD_SEARCH_SET_CUTOFF, $percent, $weight...
...数,默认不指定 源码: sdk/php/lib/XSTokenizer.class.php#L188 (显示) public function __construct($arg = null){ if (self::$_server === null) { $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should be created before using ' . ...
...身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L492 (显示) public function addDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_ADD_DB, 'buf' => $name)); $this->_curDbs[] = $name; return $this;} 添加搜索的数据库名, 支...