xunsearch 1.1.0 数据库mysql 字符集 utf8 配置文件如下 project.name = entry project.default_charset = UTF-8 server.index = 10.1.20.51:8383 server.search = 10.1.20.51:8384 [tblog_entry_id] type = id [content] type = string index = both [user_id] type = numeric index = s...
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 了 但是搜索不到什么 改成...
...怀疑是这么多字段索引造成的压力 [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] 不知这样...
...okenizer = none [/php] 这个active 只保存1或者0 可是 搜索 [php] $search->setQuery("active:1")->search(); $search->setQuery('active:"1"')->search() [/php] 这样搜不出来啊 加上双引号也搜不出来 是不是这个有最短限制啊 一个字符搜索不了啊 求助
$search->setCharset('gbk'); 无效,输出来的还是uft-8;求助我错在那里? require '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('allsource'); // 建立 XS 对象,项目名称为:demo $search = $xs->search; // 获取 搜索对象 $query = '部分'; // 这里的搜...
...语句可以用于查询商品属性非常方便,结贴了。 [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,...
机器没什么查询的,突然占用资源很大。xunsearch 版本:xs-searchd: xunsearch/1.4.7-dev (search server) [php] PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 28942 root 18 3 152m 28m 1852 S 174.6 0.2 61:51.25 xs-searchd 28940 root 18 3 152m...
...个demo项目,搜索的时候显示: 错误:Object id #9 打印出search.php捕获到的异常,显示 [XSException] ../../../../../usr/local/xunsearch/sdk/php/lib/XS.php(2165): Failed to recv the data from server completely (SIZE:0/8, REASON:closed) #0 /usr/local/xunsearch/sdk/php/lib/...
一般过程: 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('demo'); // 建立 XS 对象,项目名称为:demo $search=$xs->search; $search->setAutoSynonyms(true); $index->addSynonym('搜索','检索'); $index->addSynonym('搜索','查找'); [/php] 然后查看是否成功 [php] $xs = new XS('demo'); // 建立 XS 对象,项目名称...