... | | 3. 您现在就可以在我们提供的开发包(SDK)基础上 | | 开发您自己的搜索了。 | | 目前只支持 PHP 语言,参见下面文档: | | /usr/local/xunsearch/sdk/php/README ...
... {return} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L283 (显示) public function addSynonym($raw, $synonym){ $raw = strval($raw); $synonym = strval($synonym); if ($raw !== '' && $synonym !== '') { $cmd = new XSCommand(XS_CMD_INDE...
...n] /search.php(5): Undefined index: key(8) thrown in /home/boyce/xunsearch/sdk/php/lib/XS.php on line 469
...的还是uft-8;求助我错在那里? require '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('allsource'); // 建立 XS 对象,项目名称为:demo $search = $xs->search; // 获取 搜索对象 $query = '部分'; // 这里的搜索语句很简单,就一个短语 $search->...
[XSException] ../../../usr/local/xunsearch/sdk/php/lib/XS.php(1552): Unexpected respond in search {CMD:129, ARG:514} 代码如下 $xs = new XS('discuz'); $tokenizer = new XSTokenizerScws; $subject = $tokenizer->getTops($forumattr['subject'], 20, 'n,ns'); $stack = array(); foreach($subject as $wor...
...n} XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L283 (显示) public function setDict($fpath, $mode = null){ if (!is_int($mode)) { $mode = stripos($fpath, '.txt') !== false ? SCWS_XDICT_TXT : SCWS_XDICT_XDB; } $this->_sett...
...p配置问题吗? php.ini配置中把open_basedir=.:/usr/local/xunsearch/sdk/php/:/usr/local/nginx/html/了呀!(我nginx装在/usr/local/nginx下的) 并且给XS.php赋了755权限,骨架文件赋了755权限了! 并且我对照着看了两个平台的php.ini文件,没有特别的差...
...FieldMeta 字段元数据对象, 若不存在则返回 false 源码: sdk/php/lib/XSFieldScheme.class.php#L93 (显示) public function getField($name, $throw = true){ if (is_int($name)) { if (!isset($this->_vnoMap[$name])) { if ($throw === true) { throw new ...
...是包含 [off:词在文本中的位置,attr:词性,word:词] 源码: sdk/php/lib/XSTokenizer.class.php#L339 (显示) public function getResult($text){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); ...
...下。 [code][root@a107 ~]# /usr/local/php/bin/php /usr/local/xunsearch/sdk/php/util/Indexer.php --project=xxx –-source=mysql://xxx:xxx@localhost/xxx --sql="select ID,post_title,post_content,UNIX_TIMESTAMP(post_date) as post_time from wp_posts where (post_status='publish' or post_status='pendin...