第 2. 点你可以对分类 id 不为 0 的统一在做索引时 $doc->addTerm('cid', 'have') 然后在搜索的时候 $search->addWeight('cid', 'have') 来提权
...条件,所以你必须把 addRange, setSort 放在 setQuery 之后 $search->setQuery($q)->setLimit(...)->addRange(...)->setSort(); [/quote] 3KS
....name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [pid] type = id [subject] type = title [message] type = body [chrono] type = numeric 另外fsockopen() 报 fsockopen(): unable to connect to localhost:8384 (Permission denied)(2)
构建的搜索语句是 echo $search->getQuery($q); ------------------------------------------------------------ Xapian::Query(((F163:(pos=1) AND B海南:(pos=2)) FILTER H1))
...Duality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : 1); return $this;} 设置散字二元组合
setQuery() 方法 public XSSearch setQuery(string $query) $query string 搜索语句, 设为 null 则清空搜索语句, 最大长度为 80 字节 {return} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L227 (显示) public functio...
... (显示) 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);} 获取当前索引库的分词复合等级
$case = $search->getCorrectedQuery(‘高’); var_dump($case); array (size=3) 0 => string '高ç é' (length=8) 1 => string '高ç« ' (length=8) 2 => string '高å° ' (length=8) ini是选定的utf-8格式,不知道为什么使用纠错后,会出现以下3种增加了特殊字...
php Indexer.php --info -p /var/www/xunsearch/goods.ini 查询项目信息显示: 数据库名:db 队列数据:1条 导入进程:无 每$index->add($doc) 一下队列数就增加1,但是$search->getDbTotal() 仍然是0 所以每次增加数据都不成功,请问一下是什么原...
XS Object ( [_index:private] => [_search:private] => [_scws:private] => [_scheme:private] => XSFieldScheme Object ( [_fields:private] => Array ( [newsid] => XSFieldMeta Object ( [name] => newsid [cutlen] => 0 [weight] => 1 [type] => 10 [vno] => 0 [tokenizer:private] => full [flag:private] => 1 )...