在使用xunsearch的时候,因为业务需要复杂一点的设计.这样就导致查询语句也会复制一点. Bug重现: $search->setSort('addtime',false); $docs=$search->addRange('addtime',$from,null)->search(); $count=$search->getLastCount(); 在相关时间区间里面搜索再以...
...有index,有term。查不出应该是不可能的. [/quote] [quote] $search->setQuery($array['word'])->setSort($array['sort'])->setLimit($array['limit'], $array['offset'])->search(); [/quote] 做了这样 [quote] $search->setSort($array['sort'])->setLimit($array['limit'], $array['offset'])-...
search() 方法 public XSDocument[] search(string $query=NULL, boolean $saveHighlight=true) $query string 搜索语句, 若传入 null 使用默认语句, 最大长度为 80 字节 $saveHighlight boolean 是否存储查询词用于高亮处理, 默认为 true {return} XS...
... = 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...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
...t()){ $doc->addTerm('cid', $node->getId()); } } 搜索 $search->setFacets(array('cid'), true); $search->search(); $counts = $search->getFacets('cid');
Error 500 CDbCommand 无法执行 SQL 语句: SQLSTATE[HY000]: General error: 1364 Field 'goodnum' doesn't have a default value http://www.xunsearch.com/doc/php/guide/search.count
1、配置文件search.ini [code] project.name = search project.default_charset = utf-8 server.index = 8383 server.search = 8384 [ID] type = id [title] type = title [content] type = body [/code] 2、索引 [code] util/Indexer.php --source=mysql://root:pwd@localhost/dede --sql="SELECT ID, title, c...