... * @param mixed $cs 数据字符集, 如无法确定则为 false */ public function process($data, $cs); } 中 public function process($data, $cs); 改为public function process($data, $cs = false); FreeBSD 8.2-RELEASE #0 Apache/2.2.17 (FreeBSD) mod_ssl/2.2.17 OpenSSL/0.9.8q DAV/2 PHP...
...下也能够搜索(虽然是乱码)。但是生成的骨架放在www/public_html下的时候,就出现了以下的问题: [code]Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/usr/local/xunsearch/sdk/php/lib/XS.php) is not within the allowed path(s...
...不知如何解決 Thanks 1. XSDatabase::query1 query1() 方法 public 查询结果首行, query1(string $sql) $sql string {return} 查询结果[b]首行, 失败或无数据[/b]则返回 false 源码: sdk/php/util/XSDataSource.class.php#L450 (显示) public function query1($sql){ $sql = pre...
...implements XSTokenizer { private $length = 1; // 默认切分长度 public function __construct($arg = null){ if ($arg !== null && $arg !== '') $this->length = $arg; } public function getTokens($value, XSDocument $doc=null){ $charset = is_object($doc) ? $doc->getCharset() : 'UTF...
...implements XSTokenizer { private $length = 1; // 默认切分长度 public function __construct($arg = null){ if ($arg !== null && $arg !== '') $this->length = $arg; } public function getTokens($value, XSDocument $doc=null){ $charset = is_object($doc) ? $doc->getCharset() : 'UTF...
... 代码如下: [code]class MyBlogFilter implements XSDataFilter { public function process($data, $cs =false) { $data['content'] = $this->filterHtml($data['content']); return $data; } public function filterHtml($str) { $str...
以前的二元分词只支持英文,最后找到问题 public function getTokens($value, XSDocument $doc = null) { $terms = array(); for ($i = 0; $i < mb_strlen($value,"utf-8"); $i += $this->arg) { $terms[] = mb_substr($value, $i, $this->arg,"utf-8"); } return $terms; }...
.... 不知道能不能接受 多字段搜索呢? 我的方法: [php] public function getShopRows($array = array()){ Yii::import('application.vendors.sdk.php.lib.XS'); $xs = new XS('shop'); $query = "regionId:".$array['regionId']; //return $query;exit; $ShopDo...
写个页面包含了 require_once '/data/new_shop/public/xunsearch-full/sdk/php/lib/XS.php'; 文件或者生成demo搜索页都报同一个错误; 错误:[XSErrorException] ../../../software/install/xunsearch-full/sdk/php/lib/XS.php(501): xcache_get(): XCache var cache was not initialize...
.../../../../../ 无法确认出错的文件 建议修改成 [php] public static function getRelPath($file) { $from = getcwd(); $file = realpath($file); if (is_dir($file)) { $pos = false; $to = $file; } else { $pos = ...