...用默认语句 {return} string 返回解析后的搜索语句 源码: sdk/php/lib/XSSearch.class.php#L204 (显示) public function getQuery($query = null){ $query = $query === null ? '' : $this->preQueryString($query); $cmd = new XSCommand(XS_CMD_QUERY_GET_STRING, 0, $this->_defa...
...= $search->setQuery()->search(); 会提示setQuery 缺少参数,看了源码,原来写法是setQuery($query) 手工改成 $docs = $search->setQuery(NULL)->search(); 结果中所有type = numeric 的字段都会乱码, [from] => � [buy_stat] => � [sell_stat] => � [collect_st...
...汇数组, 每个词汇是包含 [times:次数,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_C...
...aram array 包含 path 为数据库路径 {return} string 源码: sdk/php/util/XSDataSource.class.php#L945 (显示) protected function makeDsn($param){ $dsn = 'sqlite:' . $param['path']; return $dsn;} 生成 SQLite DSN
...词记录数组, 每个词条为键, 同义词条组成的数组为值 源码: sdk/php/lib/XSSearch.class.php#L164 (显示) public function getAllSynonyms($limit = 0, $offset = 0, $stemmed = false){ $page = $limit > 0 ? pack('II', intval($offset), intval($limit)) : ''; $cmd = array('cmd' ...
...英文、中文 {return} array 返回搜索词组成的数组 源码: sdk/php/lib/XSSearch.class.php#L795 (显示) public function getCorrectedQuery($query = null){ $ret = array(); try { if ($query === null) { if ($this->_count > 0 && $this->_count > ceil($this->...
...5.35 {return} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L968 (显示) public function addQueryTerm($field, $term, $addOp = XS_CMD_QUERY_OP_AND, $scale = 1){ $term = strtolower($term); $term = XS::convert($term, 'UTF-8', $this->_charset...
...范围 0.xx ~ 655.35 {return} string 修正后的搜索语句 源码: sdk/php/lib/XSSearch.class.php#L949 (显示) public function addQueryString($query, $addOp = XS_CMD_QUERY_OP_AND, $scale = 1){ $query = $this->preQueryString($query); $bscale = ($scale > 0 && $scale != 1) ? pack...
...能还有很多不完善的,请高手多指教。也可以到这里下载源码包http://my.php100.com/viewfile.php?file_id=14373 下载积分,是官方默认的,必须加,木有办法,抱歉了! 效果: 每次增删改数据的时候,自动更新索引。 日志效果: @@...
...销 {return} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L401 (显示) public function setFacets($field, $exact = false){ $buf = ''; if (!is_array($field)) { $field = array($field); } foreach ($field as $name) { $ff =...