... ~ 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('n', intva...
[php]bash-3.2$ php sdk/php/util/Quest.php spj example_attr:small50 --show-query -------------------- 解析后的 QUERY 语句:Xapian::Query((ZHsmall:(pos=1) AND 50:(pos=2)))[/php] 搜不到任何结果?
...turn} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L386 (显示) public function addWeight($field, $term, $weight = 1){ return $this->addQueryTerm($field, $term, XS_CMD_QUERY_OP_AND_MAYBE, $weight);} 添加权重索引词 无论是否包含...
oh 谢谢!我试试[hr] require_once '/mnt/search/sdk/php/lib/XS.php'; $xs = new XS('test'); $skey = $_GET["skey"]; $search = $xs->search; $docs = $search->setQuery($skey."type:1")->search(); print_r($docs); 已经 [type] type = string index = self 了 但是搜索不到什么 改成...
...turn} 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); $bscal...
Xunsearch SDK for PHP $Id$ 这是采用 PHP 语言编写的 xunsearch 开发包,在此基础上开发您自己的全文检索。 在此简要介绍以下几个文件: - lib/XS.php 入口文件,所有搜索功能必须包含此文件 - lib/XS.class.p...
...XSSearch » XSServer » XSComponent 版本 1.0.0 源代码 sdk/php/lib/XSSearch.class.php XS 搜索类, 执行搜索功能 有部分方法支持串接操作 $xs->search->setQuery($str)->setLimit(10, 10)->search(); $xs->close(); Public 属性 隐去继承来的属性 ...
1.安装xunsearch,参见文档:http://www.xunsearch.com/doc/php/guide/start.installation,这里不必多说 2.启动xunsearch $prefix/bin/xs-ctl.sh start,即可启动xunsearch 3.构建项目:首先参考文档:http://www.xunsearch.com/doc/php/guide/ini.guide 文档中说明了项目...
... - Missing value of primarky key (FIELD:pid) #0 /usr/local/xunsearch/sdk/php/util/Indexer.php(195): XSIndex->update(Object(XSDocument)) sql语句: sql="select c.contentid,c.status,b.contentid from phpcms_content c,phpcms_c_news b where c.contentid=b.contentid and c.status=99" 配置...
...个简单的命令来论坛里问下。 [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...