一般过程: 1、实例化得到$xs = new Xs('xxx); 2、得到XSSearch实例,$search = $xs->search; 3、$search->setQuery('xxxxxxxx); 4、增加一系列的条件addRange 5、搜索前统计数量用于分页$total = $search->count(); 6、设置分页$search->setLimit(xxx,xxx); 7、取...
...怀疑是这么多字段索引造成的压力 [php]$xs=new XS('shi'); $search=$xs->search; $docs=$search->setQuery($keyword)->setLimit(12,($list_page-1)*12)->search(); $count=$search->getLastCount(); $time=$search->setQuery($keyword)->setSort('time')->setLimit(22)->search();[/php] 不知这样...
...both tokenizer = split([/[\s,\/]+/]) 搜索语句的写法为: $search->setLimit(10); //设置返回结果最多为 5 条,并跳过前 10 条 $docs = $search->search("tags:公务员考试 AND tags:论文 AND tags:杂志 AND tags:报纸 AND tags:教材"); $count = $search->getLastCount...
$search->setCharset('gbk'); 无效,输出来的还是uft-8;求助我错在那里? require '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('allsource'); // 建立 XS 对象,项目名称为:demo $search = $xs->search; // 获取 搜索对象 $query = '部分'; // 这里的搜...
tokenizer = split([/[\s,\/]+/]) 写法不正确,去掉 [] 数据量一直有说明是估算值
$xs = new XS('my_test'); // $query = $xs->search->setQuery(); $search = $xs->search; $search->query = ''; $count = $search->addRange('price',600,1000)->count(); $search->addRange('price',600,1000)->search(); $count2 = $search->getLastCount(); echo $xs->sea...
类似k-v的方式 既然主键唯一,能不能直接get出来 用search虽然也可以出来,但是不确定效率是否ok $search = $xs->search; $query =""; $search->setQuery($query); $search->addRange('pid',52382920,52382920); //$search->setSort('dateline'); $docs = $search->sea...
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 了 但是搜索不到什么 改成...
在使用xunsearch的时候,因为业务需要复杂一点的设计.这样就导致查询语句也会复制一点. Bug重现: $search->setSort('addtime',false); $docs=$search->addRange('addtime',$from,null)->search(); $count=$search->getLastCount(); 在相关时间区间里面搜索再以...
各位好,今天我在执行search代码时报错:[XSException] ThinkPHP/Extend/Vendor/sdk/php/lib/XS.php(2160): Failed to recv the data from server completely (SIZE:0/8, REASON:closed); 以前都好的,我看了下论坛里以前的错误,是在 $xs = new XS(VENDOR_PATH.'sdk/php/app/'.$...