... directory[/color] #0 XSDataSource.class.php(180): XSDatabasePDO->connect(Array) #1 XSDataSource.class.php(35): XSDatabaseDataSource->init() #2 XSDataSource.class.php(51): XSDataSource->__construct('mysql://root:12...', 'SELECT * FROM d...') #3 Indexer.php(244): XSDataSource::instance('mysql://r...
...['count']; // load vno map to name of fields $ret = $this->_facets = array(); $vnoes = $this->xs->getScheme()->getVnoMap(); // get result documents while (true) { $res = $this->getRespond(); if ($res->cmd == XS_CMD_SEARCH_RESULT_FACETS) { $off = 0; ...
...isset($this->_setting['add_dict'])) { $this->_setting['add_dict'] = array(); } $this->_setting['add_dict'][] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_ADD_DICT, $mode, $fpath); return $this;} 添加分词词典, 支持 TXT/XDB 格式
修改XS.php文件 第1558行 [php]$this->logQuery();[/php] 改为: [php]if($ret&&!stripos(str_ireplace(array('spider','bot','slurp'),'fuck123',$_SERVER['HTTP_USER_AGENT']),'fuck123')) $this->logQuery();[/php]
...ion]: xs_error_handler(8, 'ob_flush(): fai...', '/usr/local/xuns...', 176, Array) #1 /usr/local/xunsearch/sdk/php/util/Indexer.php(176): ob_flush() #2 {main} 我的系统是centos5.5 yum安装的apahce php xunsearch安装正常,检测的时候有一个缓存模块的warning 不知道是啥情...
...231): XSServer->getRespond() 2 ../lib/XS.php(2208): XSServer->execCommand(Array, 201) 3 ../lib/XS.php(2169): XSServer->setProject('cms_51cto') 4 ../lib/XS.php(1312): XSServer->open(8384) 5 ../lib/XS.php(2152): XSSearch->open(8384) 6 ../lib/XS.php(356): XSServer->__construct(8384, Object(XS)) 7...
...231): XSServer->getRespond() 2 ../lib/XS.php(2208): XSServer->execCommand(Array, 201) 3 ../lib/XS.php(2169): XSServer->setProject('cms_51cto') 4 ../lib/XS.php(1312): XSServer->open(8384) 5 ../lib/XS.php(2152): XSSearch->open(8384) 6 ../lib/XS.php(356): XSServer->__construct(8384, Object(XS)) 7...
...入的函数,部分如下: [php]function checksys($str){ $syskey = array(' AND ',' OR ',' NOT ',' AND_NOT ',' XOR ',' NEAR ',' ADJ '); $str = str_replace($syskey,' ',' '.$str.' '); $ta = explode('.',trim($str).'.'); $i = 0; $str = ''; foreach($ta as $t){ if(is_string($t) && strle...
...$doc->addTerm('cid', $node->getId()); } } 搜索 $search->setFacets(array('cid'), true); $search->search(); $counts = $search->getFacets('cid');
...) public function getTokens($value, XSDocument $doc = null){ $terms = array(); for ($i = 0; $i < strlen($value); $i += $this->arg) { $terms[] = substr($value, $i, $this->arg); } return $terms;}