搜索

大约有 63 项符合查询结果, 库内数据总量为 3,513 项。 (搜索耗时:0.0057秒)

41.addRange后count不准确

发布时间:2013-12-19 16:12 t By xilin

$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...

42.用YII的插件查找不到记录

发布时间:2013-01-09 16:01 t By gggwzh

你好,我在使用xunsearch在yii里面使用的时候查找没有返回结果: Yii::app()->search->setQuery('subject:标题'); $docs = Yii::app()->search->setLimit(5, 10)->search(); $count = Yii::app()->search->count(); foreach ($docs as $doc) { echo $doc->rank() . '. ' . $doc...

43.多个addRange后getLastCount有问题

更新时间:2013-12-16 19:12 t By xilin

例如: $query = $xs->search->setQuery($keyword); if ($c1) { $query->addRange('c1',$c1,$c2); } if ($d1) { $query->addRange('d1',$d1,$d2); } $query->setMultiSort($sorts); $rs = $query->setLimit($perPage,$start)->search(); $count = $xs->search->getLastCount(); 这时$count不准确,我看过论坛...

44.RE: 关于XS:getExpandedQuery() 方法,获取展开的搜索词列表

发布时间:2011-12-06 17:12 t By popfeng

我实现了, $uid = $_GET['uid']; $tag = $_GET['tag']; $xs = new XS('demo'); $search = $xs->search; $search->setCharset('UTF-8'); $search->setQuery('uid:' . $uid); $docs = $search->search(); $terms = $search->getExpandedQuery...

45.搜索字符过长的问题和使用addQueryString的问题

发布时间:2014-08-01 09:08 t By 459843269@qq.com

查询业务类似于 (filed1:1 or filed1:2 or filed1:3)and (filed2:1 or filed2:2 or filed2:3) and (filed3:1 or filed3:2 or filed3:3) 使用setQuery 出现异常 DATA/NAME too long 最后使用addQueryString拼装语句的方式 但是如上所述的逻辑根本无法达到括号中...

46.RE: Xunsearch 讯搜商品检索中多属性精确搜索疑问

更新时间:2014-12-29 20:12 t By liubo

查看了所有的帖子后,发现有点其他收货。就是利用 多文档联查 setDb() 方法 可是,会报错哦。 $search = new XS('goods_a'); $key = 'ipad'; // $index = $search->index; // $index->setDb('goods_b'); $search->search->setDb('goods_b'); $docs = $search->search->...

47.设置编码为gbk失效

发布时间:2012-07-12 11:07 t By 小乌龟

$search->setCharset('gbk'); 无效,输出来的还是uft-8;求助我错在那里? require '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('allsource'); // 建立 XS 对象,项目名称为:demo $search = $xs->search; // 获取 搜索对象 $query = '部分'; // 这里的搜...

48.迅搜报错

更新时间:2012-07-16 17:07 t By bustard

[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...

49.XSSearch::setScwsMulti

setScwsMulti() 方法 (自版本 v1.4.7 起可用) public XSSearch setScwsMulti(int $level) $level int 要设置的分词复合等级 {return} XSSearch 返回自身对象以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L444 (显示) public function setScwsMult...

50.区间搜索(addRange)返回总数误差很大

发布时间:2013-07-22 16:07 t By hung

字段配置:"use_year"为1-70的整型 [code] [use_year] type = 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'...

  • 时间不限
  • 按相关性排序