...: [quote] $xs->setQuery('贪污')->setLimit(5)->search(); echo $xs->getLastCount(); echo ''; $xs->setQuery('贪污')->setLimit(50)->search(); echo $xs->getLastCount(); echo ''; $xs->setQuery('贪污')->addRange('publishdate', 1395331200, nu...
...>&1 & try_times=5 if [[ $1 == 'help' || $4'x' == 'x' ]] then echo "arg1 try:url,example http://www.xunsearch.com/site/search?q=demo " echo "arg2 res_content,example:RE (content of arg1 must include arg2) " echo "arg3 path of xs_ctl.sh example: /usr/local/services/xunsearch/bi...
... $count = Yii::app()->search->count(); foreach ($docs as $doc) { echo $doc->rank() . '. ' . $doc->subject . " [" . $doc->percent() . "%] - "; echo date("Y-m-d", $doc->chrono) . "\n" . $doc->message . "\n"; } echo "count:".$count; $count 等于5, $docs返回的是一个...
...改了。 你建议你在 test.php 里的 scws_new() 之前加一句: echo "dict content: \n"; echo file_get_contents('/data/html/365search/dict.film.txt'); echo "\n-------\n"; 看看你的 dict.film.txt 是不是真的写入了?
...emo'); $docs = $xs->search->search('15'); } catch (XSException $e) { echo $e; // 直接输出异常描述 if (defined('DEBUG')) // 如果是 DEBUG 模式,则输出堆栈情况 echo "\n" . $e->getTraceAsString() . "\n"; }
...'price',600,1000)->search(); $count2 = $search->getLastCount(); echo $xs->search->getDbTotal().''; echo $count.' count2:'.$count2; 输出结果为:2129 1064 count2:532 从数据库中可以看到的结果为137条,输出是1064及532,不清楚原因,奇怪的现象是count值基...
...d($doc); } echo '200'; } } catch(XSException $e) { echo '500'; } 更新 try { ...
...获取搜索结果的匹配总数估算值 $search->setCharset('gbk'); echo ''; var_dump($docs); echo '';
... if($this -> so->add_dict('mydict_utf8.txt', SCWS_XDICT_TXT)) { echo 'ok'; } else { echo 'no'; } $this -> so->set_rule('rules.utf8.ini'); } function word_list($text) { $time_start = $this -> get_microtime(); $this -> so->send_text($text); while ($t...
...后一个函数。 public function process($data, $cs=false) { //echo "\n----- DEBUG DATA INFO -----\n"; //print_r(str_replace('--', '', $data['content'])); $data['content']=str_replace("", '', $data['content']); $data['content']=str_replace("", '', $data['content']); $dat...