我的字段中有:type, topicid 两个numeric字段 当 $res = $search->setQuery($_GET['kw'])->addRange('type',2,3)->search(); 进行查询时 topicid字段不存在于结果集中 但是:如果使用 $res = $search->search($_GET['kw']); 或者 $search->setQuery($_GET['kw'])->search();...
...语句可以用于查询商品属性非常方便,结贴了。 [php]$search = $xs->search->setFuzzy(); 1.$docs = $search->setQuery('cid:hello,world')->search(); 2.$docs = $search->addQueryTerm('cid', 'hello')->addQueryTerm('cid', 'world')->search(); 3.$docs = $xs->search->setQuery('cid:hello,...
...t()){ $doc->addTerm('cid', $node->getId()); } } 搜索 $search->setFacets(array('cid'), true); $search->search(); $counts = $search->getFacets('cid');
想列出所有数据,看了http://bbs.xunsearch.com/showthread.php?tid=349&pid=4427#pid4427这个帖子,把关键字设为空了 $xs = new XS($project); $search = $xs->search; $docs = $search->setQuery()->search(); 会提示setQuery 缺少参数,看了源码,原来写法是setQuery(...
...怀疑是这么多字段索引造成的压力 [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] 不知这样...
...,然后统一在一起就解决了,哎,暂时就这样吧,希望xunsearch 啥时候可以针对 split(|) 分割的字段进行分面搜索 $arrTag = array(9000,9001,9002……); $tagCount = array(); foreach ($arrTag as $kT => $vT) { $arr1 =array(); $search->setQuery($queryTagFace.' ...
... = string [/code] 搜索代码: [code] $xs = new XS('data.ini'); $search = $xs->getSearch(); $query = $fields['query']; $from = $fields['from']; $to = $fields['to']; $search->setQuery($query); $search->addRange('use_year', $from , $to); $docs = $search->search(); print_r($search->co...
...再加一个条件,检索另一个字段,我用addQueryTerm,加了$search->addQueryTerm('pp',$pp);然后搜索,发现不管用 请问有什么办法可以同时检索另一个字段?[hr] 请问有人知道吗?
...再加一个条件,检索另一个字段,我用addQueryTerm,加了$search->addQueryTerm('pp',$pp);然后搜索,发现不管用 请问有什么办法可以同时检索另一个字段?[hr] 请问有人知道吗?
...Id:".$array['regionId']; //return $query;exit; $ShopDoc = $xs->search->setCharset('UTF-8')->setLimit(1000, 0)->search($query);//我现在想再search里传入数组,进行多字段的查询...不知道怎么实现呢? $shopRows = array(); $fields = $xs->getAllFields(); ...